python - Reinitializing learned linear models with scikit-learn -


say run sgdregressor or sgdclassifier, , set of coefficients want use future. it's trivial basic predictions (since, regressor, it's matrix multiplication), it'd nice able @ other methods on fitted model (like predict_proba, etc.). there way in general? i've been looking through docs , couldn't find anything.

specific code example clarity:

from sklearn import linear_model  sgd = linear_model.sgdregressor() sgd.fit([[0, 1, 1], [0, -1, 1]], [0, 1]) coefs = sgd.coef_ intercept = sgd.intercept_ 

and i'd keep coefs , intercept stored somewhere , able reinitialize sgdregressor them. possible?

coefficiants may other calculations. if it's not case, can save learned model disc , use later without reinitializing.

here example: scikit learn svm, how save/load support vectors?


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -