How to train sklearn svm model(sklearn.svm.SVC) with epochs?

Viewed 2145

I want to see if the model is converging on my cross validation. How do i increase or decrease epochs in sklearn.svm.SVC? currently:

SVM_Model = SVC(gamma='auto')
SVM_Model.fit(X_train,y_train)

Also how can I see a progress bar during the training?

1 Answers

You have the combination of max_iter and tol to achieve the convergence.

max_iter int, optional (default=-1)
Hard limit on iterations within solver, or -1 for no limit.

tol float, optional (default=1e-3)
Tolerance for stopping criterion.

Progress bar support is currently not available in Sklearn now but you can use the verbose param to know the progress.

verbose bool, default: False
Enable verbose output. Note that this setting takes advantage of a per-process runtime setting in libsvm that, if enabled, may not work properly in a multithreaded context.

Related