python - Scikit-learn, Numpy: Changing the value of an read-only variable -


i'm using scikit-learn train svm.

after train model on data, want change coef_ of model.

#initiate svm model = svm.svc(parameters...)  #train model data model.fit(x,y)  #now want change coef_ attribute(a numpy array) model.coef_ = newcoef 

problem: gives me attributeerror: can't set attribute. or when try access numpy array in attribute gives me valueerror: assignment destination read-only.

is there way change attributes of existing model?

(i want because want parallelize svm training, , have change coef_ attribute this.)


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -