GridSearchCV scoring 参考
http://scikit-learn.org/stable/modules/model_evaluation.html
- Scoring parameter: Model-evaluation tools using cross-validation (such as
model_selection.cross_val_score
andmodel_selection.GridSearchCV
) rely on an internal scoring strategy. This is discussed in the section The scoring parameter: defining model evaluation rules. For the most common use cases, you can designate a scorer object with the
scoring
parameter; the table below shows all possible values. All scorer objects follow the convention that higher return values are better than lower return values. Thus metrics which measure the distance between the model and the data, likemetrics.mean_squared_error
, are available as neg_mean_squared_error which return the negated value of the metric.Scoring Function Comment Classification ‘accuracy’ metrics.accuracy_score
‘average_precision’ metrics.average_precision_score
‘f1’ metrics.f1_score
for binary targets ‘f1_micro’ metrics.f1_score
micro-averaged ‘f1_macro’ metrics.f1_score
macro-averaged ‘f1_weighted’ metrics.f1_score
weighted average ‘f1_samples’ metrics.f1_score
by multilabel sample ‘neg_log_loss’ metrics.log_loss
requires predict_proba
support‘precision’ etc. metrics.precision_score
suffixes apply as with ‘f1’ ‘recall’ etc. metrics.recall_score
suffixes apply as with ‘f1’ ‘roc_auc’ metrics.roc_auc_score
Clustering ‘adjusted_rand_score’ metrics.adjusted_rand_score
Regression ‘neg_mean_absolute_error’ metrics.mean_absolute_error
‘neg_mean_squared_error’ metrics.mean_squared_error
‘neg_median_absolute_error’ metrics.median_absolute_error
‘r2’ metrics.r2_score
GridSearchCV scoring 参考的更多相关文章
- sklearn的GridSearchCV例子
class sklearn.model_selection.GridSearchCV(estimator, param_grid, scoring=None, fit_params=None, n_j ...
- GridSearchCV
GridSearchCV 简介: GridSearchCV,它存在的意义就是自动调参,只要把参数输进去,就能给出最优化的结果和参数.但是这个方法适合于小数据集,一旦数据的量级上去了,很难得出结果.这个 ...
- GridSearchCV 与 RandomizedSearchCV 调参
GridSearchCV GridSearchCV的名字其实可以拆分为两部分,GridSearch和CV,即网格搜索和交叉验证. 这两个概念都比较好理解,网格搜索,搜索的是参数,即在指定的参数范 ...
- GridSearchCV和RandomizedSearchCV调参
1 GridSearchCV实际上可以看做是for循环输入一组参数后再比较哪种情况下最优. 使用GirdSearchCV模板 # Use scikit-learn to grid search the ...
- pipeline结合GridSearchCV的一点小介绍
clf = tree.DecisionTreeClassifier() ''' GridSearchCV search the best params ''' pipeline = Pipeline( ...
- 机器学习——交叉验证,GridSearchCV,岭回归
0.交叉验证 交叉验证的基本思想是把在某种意义下将原始数据(dataset)进行分组,一部分做为训练集(train set),另一部分做为验证集(validation set or test set) ...
- GridsearchCV调参
在利用gridseachcv进行调参时,其中关于scoring可以填的参数在SKlearn中没有写清楚,就自己找了下,具体如下: parameters = {'eps':[0.3,0.4,0.5,0. ...
- 封装GridSearchCV的训练包
import xgboost as xgb from sklearn.model_selection import GridSearchCV from sklearn.metrics import m ...
- StratifiedKFold与GridSearchCV版本前后使用方法
首先在sklearn官网上你可以看到: 所以,旧版本import时: from sklearn.cross_validation import GridSearchCV 新版本import时: fro ...
随机推荐
- Java JDK安装和配置(Windows)
安装和配置JDK JDK中自带了JRE,不需要单独下载, 打开JDK安装, 选择安装目录,下一步,装完JDK,会问是否安装JRE,选下一步, 最后还会问是否安装Java FX, 装完后就全部完成了JD ...
- Window Handle介绍
HANDLE(句柄)是Windows操作系统中的一个概念.在Windows程序中,有各种各样的资源(窗口.图标.光标等),系统在创建这些资源时会为它们分配内存,并返回标示这些资源的标示号,即句柄.句柄 ...
- python 的os的总结
转:http://www.cnblogs.com/BeginMan/p/3327291.html
- C#反射 -- 基础
两个现实中的例子:1.B超:大家体检的时候大概都做过B超吧,B超可以透过肚皮探测到你内脏的生理情况.这是如何做到的呢?B超是B型超声波,它可以透过肚皮通过向你体内发射B型超声波,当超声波遇到内脏壁的时 ...
- Oracle的闪回特性之恢复truncate删除表的数据
Oracle的闪回特性之恢复truncate删除表的数据 SQL> show parameter flashback NAME T ...
- CentOS上面搭建SVN服务器
1.安装svn sudo yum install subversion 查看安装位置 which svnserve 确认安装成功 svnserve --version 2.修改全局配置文件修改全局配置 ...
- 2、通过HBase API进行开发
一.将HBase的jar包及hbase-site.xml添加到IDE 1.到安装HBase集群的任意一台机器上找到HBase的安装目录,到lib目录下下载HBase需要的jar包,然后再到conf目录 ...
- 模块的分类以及time与date time 模块 radom模块
1.标准库,或者内置模块,python解释器自带的,比如sys,os模块 2.开源模块,或者叫第三方模块,python就强大在这里. 3.自定义模块. 标准库: 1.时间模块time与datetime ...
- 关于 NULL的坑
有如下的表: select * from testtable where name in ('name'): 结果是第一条: select * from testtable where name n ...
- python学习(八) 异常
8.1 什么是异常 8.2 按自己的方式出错 如何引发异常,以及创建自己的异常类型. 8.2.1 raise语句 >>> raise Exception Traceback (mos ...