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++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -