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

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -