from sklearn.svm import SVC
clf2 = SVC(gamma='auto', probability='True')
**clf2.fit(X_train, y_train)**
prob_pos = clf2.decision_function(X_test)
print(prob_pos)
prob_pos = \
(prob_pos - prob_pos.min()) / (prob_pos.max() - prob_pos.min())
получение следующей ошибки в указанном коде
TypeError Traceback (most recent call last)
<ipython-input-20-c0644927d9e8> in <module>
95 from sklearn.svm import SVC
96 clf2 = SVC(gamma='auto', probability='True')
---> 97 clf2.fit(X_train, y_train)
98 prob_pos = clf2.decision_function(X_test)
99 print(prob_pos)
~\Anaconda3\lib\site-packages\sklearn\svm\_base.py in fit(self, X, y, sample_weight)
197
198 seed = rnd.randint(np.iinfo('i').max)
--> 199 fit(X, y, sample_weight, solver_type, kernel, random_seed=seed)
200 # see comment on the other call to np.iinfo in this file
201
~\Anaconda3\lib\site-packages\sklearn\svm\_base.py in _dense_fit(self, X, y, sample_weight,
solver_type, kernel, random_seed)
256 cache_size=self.cache_size, coef0=self.coef0,
257 gamma=self._gamma, epsilon=self.epsilon,
--> 258 max_iter=self.max_iter, random_seed=random_seed)
259
260 self._warn_from_fit_status()
sklearn \ svm_libsvm.pyx в sklearn.svm._libsvm.fit ()
Ошибка типа: требуется целое число