changed SVM hyperparameters

This commit is contained in:
Anne Lorenz 2018-09-14 09:43:47 +02:00
parent 06bd8481cd
commit a6df94131c
1 changed files with 4 additions and 4 deletions

8
SVM.py
View File

@ -51,10 +51,10 @@ class SVM:
pipeline = Pipeline([('perc', selector), ('SVC', SVC())]) pipeline = Pipeline([('perc', selector), ('SVC', SVC())])
grid = GridSearchCV(pipeline, {'perc__percentile': [50, 100], grid = GridSearchCV(pipeline, {'perc__percentile': [25, 50, 75, 100],
'SVC__kernel': ['linear','poly','rbf','sigmoid'], 'SVC__kernel': ['linear','poly'],
'SVC__gamma': [0.01, 0.1], 'SVC__gamma': [0.001, 0.01],
'SVC__C': [0.01, 0.1]}, 'SVC__C': [0.1, 1]},
cv=skf, cv=skf,
scoring=make_scorer(f1_score)) scoring=make_scorer(f1_score))