-
-
Save amankharwal/25c07f676ebbbe50e6731da481cdad3d 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
from sklearn.model_selection import GridSearchCV | |
param_grid = {'C': [0.1,1, 10, 100], 'gamma': [1,0.1,0.01,0.001]} | |
grid = GridSearchCV(SVC(),param_grid,refit=True,verbose=2) | |
grid.fit(X_train,y_train) | |
grid_predictions = grid.predict(X_test) | |
print(confusion_matrix(y_test,grid_predictions)) | |
print(classification_report(y_test,grid_predictions)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment