FIX: Replaced dot-product with norm from sklearn.utils.extmath