Re: [scikit-learn] Mahalanobis distance metric in OPTICS

2019-05-31 Thread Adrin
Mahalanobis is always tricky, the covariance is between the features, not the samples. This works: OPTICS(metric='mahalanobis',metric_params={'VI': np.linalg.inv(np.cov(test_array.T))}).fit(test_array) Not sure why it wouldn't work when you pass V, as it suggests as an alternative. On Fri, May 3

[scikit-learn] How is linear regression in scikit-learn done? Do you need train and test split?

2019-05-31 Thread C W
Hello everyone, I'm new to scikit learn. I see that many tutorial in scikit-learn follows the work-flow along the lines of 1) tranform the data 2) split the data: train, test 3) instantiate the sklearn object and fit 4) predict and tune parameter But, linear regression is done in least squares, s