Created
March 14, 2019 22:39
-
-
Save ResidentMario/8410d0daf51b417145b970ed5fedf64e 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
# import a classifier object | |
from sklearn.svm import LinearSVC | |
# initialize it with hyperparameters | |
clf = LinearSVC(penalty='l2', loss='hinge') | |
# call fit on data to train the model | |
clf.fit(X, y) | |
# call predict to get predictions | |
y_pred = clf.predict(y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment