After running a SVC grid search with linear, rbf and sigmoid kernels, I got
the following:

Classification report for the best estimator:
> SVC(C=403.428793493, cache_size=600, class_weight=None,
> coef0=20.0855369232,  degree=3, gamma=0.367879441171, kernel=sigmoid,
> max_iter=-1, probability=False, shrinking=True, tol=0.001, verbose=False)


note that the above says that the best estimator is a sigmoid with:
coef0 = 20.0855369232
gamma=0.367879441171
*degree=3 ?*

I am confused about the above. As far as I understand sigmoids don't have a
degree: http://scikit-learn.org/dev/modules/svm.html#kernel-functions

Why is GridSearchCV reporting a degree for a sigmoid? Note: I am using
0.14-git (master branch)

Below is the code I used to generate the above (minus the data)
================================

grid_exps = np.arange(-18,18, 1)
grid_values = np.exp(grid_exps)

tuned_parameters = [
                    {'kernel': ['linear'],  'C': grid_values},
                    {'kernel': ['rbf'],     'C': grid_values, 'gamma':
grid_values},
                    {'kernel': ['sigmoid'], 'C': grid_values, 'gamma':
grid_values, 'coef0': grid_values},

                    ]

skf = StratifiedKFold(y,5)
clf = GridSearchCV(SVC(C=1, cache_size=600), tuned_parameters,
scoring="roc_auc", n_jobs=1, cv=skf)
clf.fit(X, y)
================================

Josh
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to