Programming, Data Science, Machine Learning, Python.
dataset: clf = SVM() clf.fit(X_train, y_train) predictions = clf.predict(X_test) def accuracy(y_true, y_pred): accuracy = np.sum(y_true == y_pred) / len(y_true) return accuracy*100 print("SVM classification accuracy", accuracy(y_test, predictions)) >> SVM classification accuracy 100.0 The model