Last active
October 9, 2019 05:33
-
-
Save sahil280114/c51cc1e33bb665ca727f81e71f33a3a2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
clf = Pipeline([("dct", DictVectorizer()), ("svc", LinearSVC())]) | |
params = { | |
"svc__C": [1e15, 1e13, 1e11, 1e9, 1e7, 1e5, 1e3, 1e1, 1e-1, 1e-3, 1e-5] | |
} | |
gs = GridSearchCV(clf, params, cv=10, verbose=2, n_jobs=-1) | |
gs.fit(X, y) | |
model = gs.best_estimator_ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment