-
-
Notifications
You must be signed in to change notification settings - Fork 26.2k
Closed
Labels
Description
As reported on this stackoverflow question the current implementation of liblinear models is using a special memory layout for the coefficient (currently stored in the raw_coef_
array). Those coefficients are made read-only accessible to the user by means of the python properties coef_
and intercept_
. However this solution prevents the user to change some of the coefficient values or to reassign a complete coef_
array on a the fitted estimator.
It would be much nicer to have coef_
/ intercept_
as traditional array attributes instead.
Options:
- store parameters fitted by liblinear using the traditional
coef_
/intercept_
layout and copy those parameters at prediction time to a temporary array suitable for prediction using liblinear - implement
predict
andpredict_proba
in numpy instead of usingliblinear
at prediction time hence we could use standard numpy arrays with the usual layout forcoef_
andintercept_
xiaohan2012