-
-
Notifications
You must be signed in to change notification settings - Fork 26.4k
Closed
Labels
EasyWell-defined and straightforward way to resolveWell-defined and straightforward way to resolve
Description
When I use LassoLarsIC with a small number of samples I get the following warning:
$ /l/python3/lib/python3.3/site-packages/sklearn/linear_model/least_angle.py:1256: RuntimeWarning: divide by zero encountered in log
self.criterion_ = n_samples * np.log(mean_squared_error) + K * df
I think the problem is here: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/least_angle.py#L1290
Perhaps some care should be taken when mean_squared_error == 0?
Metadata
Metadata
Assignees
Labels
EasyWell-defined and straightforward way to resolveWell-defined and straightforward way to resolve