Created
August 3, 2018 20:37
-
-
Save ImadDabbura/aff23eaab552c0d600374bb25e337a97 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build SVM classifier | |
clf_svc = make_pipeline(StandardScaler(), | |
SVC(C=0.01, | |
gamma=0.1, | |
kernel="poly", | |
degree=5, | |
coef0=10, | |
probability=True)) | |
clf_svc.fit(X_train, y_train) | |
svc_cv_scores = cross_val_score(clf_svc, | |
X=X_train, | |
y=y_train, | |
scoring="f1", | |
cv=10, | |
n_jobs=-1) | |
# Print CV | |
print(f"\033[1m\033[94mThe 10-folds CV f1-score is: {np.mean(svc_cv_scores) * 100:.2f}%") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment