如何训练 sklearn svm model(sklearn.svm.SVC) with epochs?

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

我想看看模型是否收敛于我的交叉验证。我如何增加或减少 sklearn.svm.SVC 中的纪元? 目前:

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

另外,如何在训练过程中看到进度条?

你有max_itertol的组合来实现收敛。

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.

Sklearn 目前不支持进度条,但您可以使用 verbose 参数了解进度。

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.