Reputation: 4084
I see in the documentation, there is max_iter
option in sklearn.svm.SVC
class constructor
http://scikit-learn.org/dev/modules/generated/sklearn.svm.SVC.html#sklearn.svm.SVC
But whenever I try to use it, I'll get an error message like this
svc = svm.SVC(kernel=kernel_option[kernel_gene], degree=degree_value, gamma=gamma_value, max_iter = 1000)
TypeError: __init__() got an unexpected keyword argument 'max_iter'
Here is my code:
svc = svm.SVC(kernel=kernel_option[kernel_gene], degree=degree_value, gamma=gamma_value, max_iter = 1000)
Since kernel_option, degree and gamma value is alright. What's wrong here? Do I have some kind of syntax error or what?
EDIT:
@Ogrissel has found the problem. I use 0.12.1, while the documentation is for 1.3
Since 1.2.1 is the most recent stable, is there any solution (define max_iter) for sklearn.svm.SVC
?
Upvotes: 1
Views: 2145
Reputation: 40149
This is the development version of the documentation that matches the current state of the master branch on the git repository. You are likely running a released version of scikit-learn. Please use the documentation matching your version of scikit-learn or build scikit-learn from the source repo instead.
Upvotes: 1