SVM Focus on Kernel Parameter: RBF(default) vs Linear values

Importing Modules


In [ ]:
from sklearn import svm

Run Variables Setup If Necessary


In [ ]:
if 'features_train' not in locals() or globals():
    %run ../dev/environment_setup.ipynb

Reduced Variables DataSet (1%)


In [ ]:
features_train_small = features_train[:len(features_train)/100]
labels_train_small = labels_train[:len(labels_train)/100]

Load SVM Classifier with Kernel Parameter: RBF value


In [ ]:
clf = svm.SVC(kernel='rbf')

Train and Predict Data


In [ ]:
train_predict("Train and Predict Data with RBF Kernel Value")

Load SVM Classifier with Kernel Parameter: Linear value


In [ ]:
clf = svm.SVC(kernel='linear')

Train and Predict Data


In [ ]:
train_predict("Train and Predict Data with Linear Kernel Value")