From 59d075b48a6ca1ed1a580c72b94282644c00f2ec Mon Sep 17 00:00:00 2001 From: Bruno Chevalier Date: Sat, 25 Nov 2023 02:30:47 +0100 Subject: [PATCH] Update sklearn-automated-classification.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit degree: int, default=3 Degree of the polynomial kernel function (‘poly’). Must be non-negative. Ignored by all other kernels. make sure to cast degree to int --- docs/notebooks/notebooks/sklearn-automated-classification.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/notebooks/notebooks/sklearn-automated-classification.rst b/docs/notebooks/notebooks/sklearn-automated-classification.rst index 48b439e..8904d54 100644 --- a/docs/notebooks/notebooks/sklearn-automated-classification.rst +++ b/docs/notebooks/notebooks/sklearn-automated-classification.rst @@ -118,7 +118,7 @@ curve in 5-fold cross-validation. model = KNeighborsClassifier(n_neighbors=int(n_neighbors)) model.fit(x_train, y_train) elif algorithm == 'SVM': - model = train_svm(x_train, y_train, kernel, C, gamma, degree, coef0) + model = train_svm(x_train, y_train, kernel, C, gamma, int(degree or 0), coef0) elif algorithm == 'naive-bayes': model = GaussianNB() model.fit(x_train, y_train)