Last active
August 26, 2020 12:02
-
-
Save FeryET/d3c8dd898061bc45f5797f19d5175ac5 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
folds = RepeatedStratifiedKFold(n_splits=10, n_repeats=10) | |
vectorizer = TomotopyLDAVectorizer(num_of_topics=15, workers=workers, min_df=min_df, | |
rm_top=rm_top) | |
clf = SVC() | |
pca = PCA(n_components=0.95) | |
pipe = Pipeline([("vectorizer", vectorizer), ("scalar", StandardScaler()), | |
("classifier", clf)]) | |
results = cross_val_score(pipe, docs, y_true, cv=folds, n_jobs=2, verbose=1, | |
scoring="accuracy") | |
print("Accuracy -> mean: {}\t std: {}".format(results.mean(), results.std())) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment