Discussion:
[Scikit-learn-general] Optimization of the SVM parameters
Gianni Iannelli
2013-06-21 22:58:52 UTC
Permalink
Dear All,
I'm stuck with a problem and I don't know if it's a bug. I'm defining the optimization parameter C and gamma for my SVM in this way:
C = 10.0 ** numpy.arange(-3, 9)gamma = 10.0 ** numpy.arange(-6, 4)param_grid = dict(gamma=gamma, C=C)svr = svm.SVC(kernel='rbf')clfopt = grid_search.GridSearchCV(svr,param_grid)clfopt.fit(X_train, Y_train)
Changing the dataset I always get the same C and gamma that are 0.001 and 1e-06. With that I get a worst result!!!If I set manually to different C and gamma I get a better result!
With this optimization I get always the same result also for different subset of training of my dataset!
I'm completely lost and I don't know if probably this is due to the training set size. I'm saying this because if I reduce my dataset, this optimization works. So I was thinking that the cause could be the big dataset.
Maybe is a bug that with big dataset it give these strange results of C and Gamma (that are the lower limit that I set for the two to be researched).
Do you know if there is another way to find a best C and Gamma without using the grid_search_GridSearch ?
If you think strange I will segnalate as bug.
Thanks All!!!
Joel Nothman
2013-06-22 09:24:17 UTC
Permalink
Hi Gianni,

How did you check what the selected parameters are? Did you use
clfopt.best_params_?

- Joel



On Sat, Jun 22, 2013 at 8:58 AM, Gianni Iannelli <***@msn.com>wrote:

> Dear All,
>
> I'm stuck with a problem and I don't know if it's a bug. I'm defining the
> optimization parameter C and gamma for my SVM in this way:
>
> C = 10.0 ** numpy.arange(-3, 9)
> gamma = 10.0 ** numpy.arange(-6, 4)
> param_grid = dict(gamma=gamma, C=C)
> svr = svm.SVC(kernel='rbf')
> clfopt = grid_search.GridSearchCV(svr,param_grid)
> clfopt.fit(X_train, Y_train)
>
> Changing the dataset I always get the same C and gamma that are 0.001 and
> 1e-06. With that I get a worst result!!!If I set manually to different C
> and gamma I get a better result!
>
> With this optimization I get always the same result also for different
> subset of training of my dataset!
>
> I'm completely lost and I don't know if probably this is due to the
> training set size. I'm saying this because if I reduce my dataset, this
> optimization works. So I was thinking that the cause could be the big
> dataset.
>
> Maybe is a bug that with big dataset it give these strange results of C
> and Gamma (that are the lower limit that I set for the two to be
> researched).
>
> Do you know if there is another way to find a best C and Gamma without
> using the grid_search_GridSearch ?
>
> If you think strange I will segnalate as bug.
>
> Thanks All!!!
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
Andreas Mueller
2013-06-22 11:27:43 UTC
Permalink
On 06/22/2013 12:58 AM, Gianni Iannelli wrote:
> Dear All,
>
> I'm stuck with a problem and I don't know if it's a bug. I'm defining
> the optimization parameter C and gamma for my SVM in this way:
>
> C = 10.0 ** numpy.arange(-3, 9)
> gamma = 10.0 ** numpy.arange(-6, 4)
> param_grid = dict(gamma=gamma, C=C)
> svr = svm.SVC(kernel='rbf')
> clfopt = grid_search.GridSearchCV(svr,param_grid)
> clfopt.fit(X_train, Y_train)
>
What are the scores that you get?
Have you tried "verbose=2"?
How do you determine good and bad results?
The GridSearchCV uses accuracy_score by default.
If you want to use anything else, you have to tell GridSearchCV.
Gianni Iannelli
2013-06-23 13:41:40 UTC
Permalink
This post might be inappropriate. Click to display it.
Joel Nothman
2013-06-23 13:49:13 UTC
Permalink
Sorry, I think Andy meant verbose=3, so we can see the scores!

Alternatively, yes, what is in cv_scores_?


On Sun, Jun 23, 2013 at 11:41 PM, Gianni Iannelli <***@msn.com>wrote:

> Hi Gianni,
>
> How did you check what the selected parameters are? Did you use
> clfopt.best_params_?
>
> - Joel
>
> Yes, I use these:
>
> *gamma = clfopt.best_estimator_.gamma*
> *C = clfopt.best_estimator_.C*
> *
> *
>
> What are the scores that you get?
>
> I don't know how to see that. I see that I could use the 'cv_scores_' attribute.
> Is it what you mean?
>
>
> Have you tried "verbose=2"?
>
> No, I never use it and actually I don't what does it mean. I saw that
> control the verbosity but I don't know what does it mean in this context.
> Now I runned and you could find the process below.
>
> How do you determine good and bad results?
>
> I use the clfopt.best_params_. I was using the score but actually what
> happen is that I get always the same score because the SVM classify all my
> test set in one class. But If I set C and gamma using different values I
> get better score.
>
> The GridSearchCV uses accuracy_score by default.
> If you want to use anything else, you have to tell GridSearchCV.
>
> I can define using the attribute scoring right? This one:
>
> *scoring* : string or callable, optional
>
> Either one of either a string (“zero_one”, “f1”, “roc_auc”, ... for
> classification, “mse”, “r2”,... for regression) or a callable. See ‘Scoring
> objects’ in the model evaluation section of the user guide for details.
>
>
> Thanks guys for your support!!!
>
> Here what python print using the verbose = 2:
>
> [GridSearchCV] C=0.001, gamma=1e-06
> ............................................
> [GridSearchCV] ................................... C=0.001, gamma=1e-06 -
> 0.0s
> [Parallel(n_jobs=1)]: Done 1 jobs | elapsed: 0.0s
> [GridSearchCV] C=0.001, gamma=1e-06
> ............................................
> [GridSearchCV] ................................... C=0.001, gamma=1e-06 -
> 0.0s
> [GridSearchCV] C=0.001, gamma=1e-06
> ............................................
> [GridSearchCV] ................................... C=0.001, gamma=1e-06 -
> 0.0s
> [GridSearchCV] C=0.001, gamma=3.5938136638e-06
> .................................
> [GridSearchCV] ........................ C=0.001, gamma=3.5938136638e-06 -
> 0.0s
> [GridSearchCV] C=0.001, gamma=3.5938136638e-06
> .................................
> [GridSearchCV] ........................ C=0.001, gamma=3.5938136638e-06 -
> 0.0s
> [GridSearchCV] C=0.001, gamma=3.5938136638e-06
> .................................
> [GridSearchCV] ........................ C=0.001, gamma=3.5938136638e-06 -
> 0.0s
> [GridSearchCV] C=0.001, gamma=1.29154966501e-05
> ................................
> [GridSearchCV] ....................... C=0.001, gamma=1.29154966501e-05 -
> 0.0s
> [GridSearchCV] C=0.001, gamma=1.29154966501e-05
> ................................
> [GridSearchCV] ....................... C=0.001, gamma=1.29154966501e-05 -
> 0.0s
> [GridSearchCV] C=0.001, gamma=1.29154966501e-05
> ................................
> [GridSearchCV] ....................... C=0.001, gamma=1.29154966501e-05 -
> 0.0s
> [GridSearchCV] C=0.001, gamma=4.64158883361e-05
> ................................
> [GridSearchCV] ....................... C=0.001, gamma=4.64158883361e-05 -
> 0.0s
> [GridSearchCV] C=0.001, gamma=4.64158883361e-05
> ................................
> [GridSearchCV] ....................... C=0.001, gamma=4.64158883361e-05 -
> 0.0s
> [GridSearchCV] C=0.001, gamma=4.64158883361e-05
> ................................
> [GridSearchCV] ....................... C=0.001, gamma=4.64158883361e-05 -
> 0.0s
> [GridSearchCV] C=0.001, gamma=0.00016681005372
> .................................
> [GridSearchCV] ........................ C=0.001, gamma=0.00016681005372 -
> 0.0s
> [GridSearchCV] C=0.001, gamma=0.00016681005372
> .................................
> [GridSearchCV] ........................ C=0.001, gamma=0.00016681005372 -
> 0.0s
> [GridSearchCV] C=0.001, gamma=0.00016681005372
> .................................
> [GridSearchCV] ........................ C=0.001, gamma=0.00016681005372 -
> 0.0s
> [GridSearchCV] C=0.001, gamma=0.000599484250319
> ................................
> [GridSearchCV] ....................... C=0.001, gamma=0.000599484250319 -
> 0.0s
> [GridSearchCV] C=0.001, gamma=0.000599484250319
> ................................
> [GridSearchCV] ....................... C=0.001, gamma=0.000599484250319 -
> 0.0s
> ......
> [GridSearchCV] ................... C=100000000.0, gamma=0.0278255940221 -
> 9.4s
> [GridSearchCV] C=100000000.0, gamma=0.0278255940221
> ............................
> [GridSearchCV] ................... C=100000000.0, gamma=0.0278255940221 -
> 8.9s
> [GridSearchCV] C=100000000.0, gamma=0.0278255940221
> ............................
> [GridSearchCV] ................... C=100000000.0, gamma=0.0278255940221 -
> 8.9s
> [GridSearchCV] C=100000000.0, gamma=0.1
> ........................................
> [GridSearchCV] ............................... C=100000000.0, gamma=0.1 -
> 15.9s
> [GridSearchCV] C=100000000.0, gamma=0.1
> ........................................
> [GridSearchCV] ............................... C=100000000.0, gamma=0.1 -
> 15.5s
> [GridSearchCV] C=100000000.0, gamma=0.1
> ........................................
> [GridSearchCV] ............................... C=100000000.0, gamma=0.1 -
> 16.5s
> [Parallel(n_jobs=1)]: Done 360 out of 360 | elapsed: 2.4min finished
>
> ------------------------------
> Date: Sat, 22 Jun 2013 13:27:43 +0200
> From: ***@ais.uni-bonn.de
> To: scikit-learn-***@lists.sourceforge.net
> Subject: Re: [Scikit-learn-general] Optimization of the SVM parameters
>
>
> On 06/22/2013 12:58 AM, Gianni Iannelli wrote:
>
> Dear All,
>
> I'm stuck with a problem and I don't know if it's a bug. I'm defining
> the optimization parameter C and gamma for my SVM in this way:
>
> C = 10.0 ** numpy.arange(-3, 9)
> gamma = 10.0 ** numpy.arange(-6, 4)
> param_grid = dict(gamma=gamma, C=C)
> svr = svm.SVC(kernel='rbf')
> clfopt = grid_search.GridSearchCV(svr,param_grid)
> clfopt.fit(X_train, Y_train)
>
> What are the scores that you get?
> Have you tried "verbose=2"?
> How do you determine good and bad results?
> The GridSearchCV uses accuracy_score by default.
> If you want to use anything else, you have to tell GridSearchCV.
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows: Build for Windows Store.
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________ Scikit-learn-general
> mailing list Scikit-learn-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-***@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
Gianni Iannelli
2013-06-23 14:44:51 UTC
Permalink
Don't say sorry please! I tried cv_scores_ but seems that doesn't exist. I found grid_scores_ , I think it's the same (or not?):
[({'C': 0.001, 'gamma': 9.9999999999999995e-07}, 1.0, array([ 1., 1., 1.])), ({'C': 0.001, 'gamma': 3.5938136638046257e-06}, 1.0, array([ 1., 1., 1.])), ({'C': 0.001, 'gamma': 1.2915496650148827e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 0.001, 'gamma': 4.6415888336127818e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 0.001, 'gamma': 0.00016681005372000591}, 1.0, array([ 1., 1., 1.])), ({'C': 0.001, 'gamma': 0.00059948425031894088}, 1.0, array([ 1., 1., 1.])), ({'C': 0.001, 'gamma': 0.0021544346900318843}, 1.0, array([ 1., 1., 1.])), ({'C': 0.001, 'gamma': 0.0077426368268112772}, 1.0, array([ 1., 1., 1.])), ({'C': 0.001, 'gamma': 0.02782559402207126}, 1.0, array([ 1., 1., 1.])), ({'C': 0.001, 'gamma': 0.10000000000000001}, 1.0, array([ 1., 1., 1.])), ({'C': 0.01, 'gamma': 9.9999999999999995e-07}, 1.0, array([ 1., 1., 1.])), ({'C': 0.01, 'gamma': 3.5938136638046257e-06}, 1.0, array([ 1., 1., 1.])), ({'C': 0.01, 'gamma': 1.2915496650148827e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 0.01, 'gamma': 4.6415888336127818e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 0.01, 'gamma': 0.00016681005372000591}, 1.0, array([ 1., 1., 1.])), ({'C': 0.01, 'gamma': 0.00059948425031894088}, 1.0, array([ 1., 1., 1.])), ({'C': 0.01, 'gamma': 0.0021544346900318843}, 1.0, array([ 1., 1., 1.])), ({'C': 0.01, 'gamma': 0.0077426368268112772}, 1.0, array([ 1., 1., 1.])), ({'C': 0.01, 'gamma': 0.02782559402207126}, 1.0, array([ 1., 1., 1.])), ({'C': 0.01, 'gamma': 0.10000000000000001}, 1.0, array([ 1., 1., 1.])), ({'C': 0.10000000000000001, 'gamma': 9.9999999999999995e-07}, 1.0, array([ 1., 1., 1.])), ({'C': 0.10000000000000001, 'gamma': 3.5938136638046257e-06}, 1.0, array([ 1., 1., 1.])), ({'C': 0.10000000000000001, 'gamma': 1.2915496650148827e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 0.10000000000000001, 'gamma': 4.6415888336127818e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 0.10000000000000001, 'gamma': 0.00016681005372000591}, 1.0, array([ 1., 1., 1.])), ({'C': 0.10000000000000001, 'gamma': 0.00059948425031894088}, 1.0, array([ 1., 1., 1.])), ({'C': 0.10000000000000001, 'gamma': 0.0021544346900318843}, 1.0, array([ 1., 1., 1.])), ({'C': 0.10000000000000001, 'gamma': 0.0077426368268112772}, 1.0, array([ 1., 1., 1.])), ({'C': 0.10000000000000001, 'gamma': 0.02782559402207126}, 1.0, array([ 1., 1., 1.])), ({'C': 0.10000000000000001, 'gamma': 0.10000000000000001}, 1.0, array([ 1., 1., 1.])), ({'C': 1.0, 'gamma': 9.9999999999999995e-07}, 1.0, array([ 1., 1., 1.])), ({'C': 1.0, 'gamma': 3.5938136638046257e-06}, 1.0, array([ 1., 1., 1.])), ({'C': 1.0, 'gamma': 1.2915496650148827e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 1.0, 'gamma': 4.6415888336127818e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 1.0, 'gamma': 0.00016681005372000591}, 1.0, array([ 1., 1., 1.])), ({'C': 1.0, 'gamma': 0.00059948425031894088}, 1.0, array([ 1., 1., 1.])), ({'C': 1.0, 'gamma': 0.0021544346900318843}, 1.0, array([ 1., 1., 1.])), ({'C': 1.0, 'gamma': 0.0077426368268112772}, 1.0, array([ 1., 1., 1.])), ({'C': 1.0, 'gamma': 0.02782559402207126}, 1.0, array([ 1., 1., 1.])), ({'C': 1.0, 'gamma': 0.10000000000000001}, 1.0, array([ 1., 1., 1.])), ({'C': 10.0, 'gamma': 9.9999999999999995e-07}, 1.0, array([ 1., 1., 1.])), ({'C': 10.0, 'gamma': 3.5938136638046257e-06}, 1.0, array([ 1., 1., 1.])), ({'C': 10.0, 'gamma': 1.2915496650148827e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 10.0, 'gamma': 4.6415888336127818e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 10.0, 'gamma': 0.00016681005372000591}, 1.0, array([ 1., 1., 1.])), ({'C': 10.0, 'gamma': 0.00059948425031894088}, 1.0, array([ 1., 1., 1.])), ({'C': 10.0, 'gamma': 0.0021544346900318843}, 1.0, array([ 1., 1., 1.])), ({'C': 10.0, 'gamma': 0.0077426368268112772}, 1.0, array([ 1., 1., 1.])), ({'C': 10.0, 'gamma': 0.02782559402207126}, 1.0, array([ 1., 1., 1.])), ({'C': 10.0, 'gamma': 0.10000000000000001}, 1.0, array([ 1., 1., 1.])), ({'C': 100.0, 'gamma': 9.9999999999999995e-07}, 1.0, array([ 1., 1., 1.])), ({'C': 100.0, 'gamma': 3.5938136638046257e-06}, 1.0, array([ 1., 1., 1.])), ({'C': 100.0, 'gamma': 1.2915496650148827e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 100.0, 'gamma': 4.6415888336127818e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 100.0, 'gamma': 0.00016681005372000591}, 1.0, array([ 1., 1., 1.])), ({'C': 100.0, 'gamma': 0.00059948425031894088}, 1.0, array([ 1., 1., 1.])), ({'C': 100.0, 'gamma': 0.0021544346900318843}, 1.0, array([ 1., 1., 1.])), ({'C': 100.0, 'gamma': 0.0077426368268112772}, 1.0, array([ 1., 1., 1.])), ({'C': 100.0, 'gamma': 0.02782559402207126}, 1.0, array([ 1., 1., 1.])), ({'C': 100.0, 'gamma': 0.10000000000000001}, 1.0, array([ 1., 1., 1.])), ({'C': 1000.0, 'gamma': 9.9999999999999995e-07}, 1.0, array([ 1., 1., 1.])), ({'C': 1000.0, 'gamma': 3.5938136638046257e-06}, 1.0, array([ 1., 1., 1.])), ({'C': 1000.0, 'gamma': 1.2915496650148827e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 1000.0, 'gamma': 4.6415888336127818e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 1000.0, 'gamma': 0.00016681005372000591}, 1.0, array([ 1., 1., 1.])), ({'C': 1000.0, 'gamma': 0.00059948425031894088}, 1.0, array([ 1., 1., 1.])), ({'C': 1000.0, 'gamma': 0.0021544346900318843}, 1.0, array([ 1., 1., 1.])), ({'C': 1000.0, 'gamma': 0.0077426368268112772}, 1.0, array([ 1., 1., 1.])), ({'C': 1000.0, 'gamma': 0.02782559402207126}, 1.0, array([ 1., 1., 1.])), ({'C': 1000.0, 'gamma': 0.10000000000000001}, 1.0, array([ 1., 1., 1.])), ({'C': 10000.0, 'gamma': 9.9999999999999995e-07}, 1.0, array([ 1., 1., 1.])), ({'C': 10000.0, 'gamma': 3.5938136638046257e-06}, 1.0, array([ 1., 1., 1.])), ({'C': 10000.0, 'gamma': 1.2915496650148827e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 10000.0, 'gamma': 4.6415888336127818e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 10000.0, 'gamma': 0.00016681005372000591}, 1.0, array([ 1., 1., 1.])), ({'C': 10000.0, 'gamma': 0.00059948425031894088}, 1.0, array([ 1., 1., 1.])), ({'C': 10000.0, 'gamma': 0.0021544346900318843}, 1.0, array([ 1., 1., 1.])), ({'C': 10000.0, 'gamma': 0.0077426368268112772}, 1.0, array([ 1., 1., 1.])), ({'C': 10000.0, 'gamma': 0.02782559402207126}, 1.0, array([ 1., 1., 1.])), ({'C': 10000.0, 'gamma': 0.10000000000000001}, 1.0, array([ 1., 1., 1.])), ({'C': 100000.0, 'gamma': 9.9999999999999995e-07}, 1.0, array([ 1., 1., 1.])), ({'C': 100000.0, 'gamma': 3.5938136638046257e-06}, 1.0, array([ 1., 1., 1.])), ({'C': 100000.0, 'gamma': 1.2915496650148827e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 100000.0, 'gamma': 4.6415888336127818e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 100000.0, 'gamma': 0.00016681005372000591}, 1.0, array([ 1., 1., 1.])), ({'C': 100000.0, 'gamma': 0.00059948425031894088}, 1.0, array([ 1., 1., 1.])), ({'C': 100000.0, 'gamma': 0.0021544346900318843}, 1.0, array([ 1., 1., 1.])), ({'C': 100000.0, 'gamma': 0.0077426368268112772}, 1.0, array([ 1., 1., 1.])), ({'C': 100000.0, 'gamma': 0.02782559402207126}, 1.0, array([ 1., 1., 1.])), ({'C': 100000.0, 'gamma': 0.10000000000000001}, 1.0, array([ 1., 1., 1.])), ({'C': 1000000.0, 'gamma': 9.9999999999999995e-07}, 1.0, array([ 1., 1., 1.])), ({'C': 1000000.0, 'gamma': 3.5938136638046257e-06}, 1.0, array([ 1., 1., 1.])), ({'C': 1000000.0, 'gamma': 1.2915496650148827e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 1000000.0, 'gamma': 4.6415888336127818e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 1000000.0, 'gamma': 0.00016681005372000591}, 1.0, array([ 1., 1., 1.])), ({'C': 1000000.0, 'gamma': 0.00059948425031894088}, 1.0, array([ 1., 1., 1.])), ({'C': 1000000.0, 'gamma': 0.0021544346900318843}, 1.0, array([ 1., 1., 1.])), ({'C': 1000000.0, 'gamma': 0.0077426368268112772}, 1.0, array([ 1., 1., 1.])), ({'C': 1000000.0, 'gamma': 0.02782559402207126}, 1.0, array([ 1., 1., 1.])), ({'C': 1000000.0, 'gamma': 0.10000000000000001}, 1.0, array([ 1., 1., 1.])), ({'C': 10000000.0, 'gamma': 9.9999999999999995e-07}, 1.0, array([ 1., 1., 1.])), ({'C': 10000000.0, 'gamma': 3.5938136638046257e-06}, 1.0, array([ 1., 1., 1.])), ({'C': 10000000.0, 'gamma': 1.2915496650148827e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 10000000.0, 'gamma': 4.6415888336127818e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 10000000.0, 'gamma': 0.00016681005372000591}, 1.0, array([ 1., 1., 1.])), ({'C': 10000000.0, 'gamma': 0.00059948425031894088}, 1.0, array([ 1., 1., 1.])), ({'C': 10000000.0, 'gamma': 0.0021544346900318843}, 1.0, array([ 1., 1., 1.])), ({'C': 10000000.0, 'gamma': 0.0077426368268112772}, 1.0, array([ 1., 1., 1.])), ({'C': 10000000.0, 'gamma': 0.02782559402207126}, 1.0, array([ 1., 1., 1.])), ({'C': 10000000.0, 'gamma': 0.10000000000000001}, 1.0, array([ 1., 1., 1.])), ({'C': 100000000.0, 'gamma': 9.9999999999999995e-07}, 1.0, array([ 1., 1., 1.])), ({'C': 100000000.0, 'gamma': 3.5938136638046257e-06}, 1.0, array([ 1., 1., 1.])), ({'C': 100000000.0, 'gamma': 1.2915496650148827e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 100000000.0, 'gamma': 4.6415888336127818e-05}, 1.0, array([ 1., 1., 1.])), ({'C': 100000000.0, 'gamma': 0.00016681005372000591}, 1.0, array([ 1., 1., 1.])), ({'C': 100000000.0, 'gamma': 0.00059948425031894088}, 1.0, array([ 1., 1., 1.])), ({'C': 100000000.0, 'gamma': 0.0021544346900318843}, 1.0, array([ 1., 1., 1.])), ({'C': 100000000.0, 'gamma': 0.0077426368268112772}, 1.0, array([ 1., 1., 1.])), ({'C': 100000000.0, 'gamma': 0.02782559402207126}, 1.0, array([ 1., 1., 1.])), ({'C': 100000000.0, 'gamma': 0.10000000000000001}, 1.0, array([ 1., 1., 1.]))]
Andreas Mueller
2013-06-23 14:49:13 UTC
Permalink
On 06/23/2013 04:44 PM, Gianni Iannelli wrote:
> Don't say sorry please! I tried cv_scores_ but seems that doesn't
> exist. I found grid_scores_ , I think it's the same (or not?):
>
Yes, it is in the older (I think the current release) version.
The 1.0 tells you that is classifies everything perfectly with all
parameter settings.
I'm not sure how you could do any better than that ;)

This is why I asked how you measure performance.
How can you get better scores than 1?
Andreas Mueller
2013-06-23 14:47:26 UTC
Permalink
On 06/23/2013 03:49 PM, Joel Nothman wrote:
> Sorry, I think Andy meant verbose=3, so we can see the scores!
Really, that is 3? Hum ok. Don't run git blame ;)
Joel Nothman
2013-06-23 14:51:55