RBF kernel

In the last experiment, an RBF kernel was used to determine the test accuracy. Here, the cost value is kept constant with respective other kernels but the gamma value has been chosen as 0.1 to fit the model:

#RBF Kernel >>> svm_rbf_fit = SVC(kernel='rbf',C=1.0, gamma=0.1) >>> svm_rbf_fit.fit(x_train,y_train) >>> print ("\nSVM RBF Kernel Classifier - Train Confusion Matrix\n\n",pd.crosstab( y_train,svm_rbf_fit.predict(x_train),rownames = ["Actuall"],colnames = ["Predicted"])) >>> print ("\nSVM RBF Kernel Classifier - Train accuracy:",round(accuracy_score( y_train, svm_rbf_fit.predict(x_train)),3)) >>> print ("\nSVM RBF Kernel Classifier - Train Classification Report\n", classification_report(y_train,svm_rbf_fit.predict(x_train))) ...

Get Statistics for Machine Learning now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.