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 ...
随机推荐
- 序列化 SqlAlchemy 的结果为 json 字符串
http://my.oschina.net/gongshang/blog/395431?p=1 在设计 RESTful 的网站时,我们总是希望 ORM 框架返回的结果是可以直接给 View 层使用的 ...
- Cam350导入Allegro的*.rou文件
如果生产allegro的生产文件有椭圆形钻孔,生成.rou.直接自动导入到cam350是没办法成功的. 以下说说本人的步骤.allegro里面的单位都是mm 在cam350的File-->Imp ...
- eclipse 中xml文件的字体改不了
XML Editor的改不了. 修改colors & fonts里的eclipse中打开window->prefece->generation-basic 下 Text Edito ...
- List<Map> 排序
import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.u ...
- 关于Python导入其他目录中的类
在需要导入的某个类的目录中,添加一个__init__.py的文件,
- Java-Maven-Runoob:Maven 插件
ylbtech-Java-Maven-Runoob:Maven 插件 1.返回顶部 1. Maven 插件 Maven 有以下三个标准的生命周期: clean:项目清理的处理 default(或 bu ...
- 1136 A Delayed Palindrome
题意:略. 思路:大整数相加,回文数判断.对首次输入的数也要判断其是否是回文数,故这里用do...while,而不用while. 代码: #include <iostream> #incl ...
- 小程序中的setData的使用
小程序中的setData setData 函数用于将数据从逻辑层发送到视图层(异步),同时改变对应的 this.data 的值(同步). 直接修改 this.data 而不调用 this.setDat ...
- SE新手游操控创新:一个按键=五个技能
转自:http://www.gamelook.com.cn/2015/01/201299 GameLook报道 / 日本游戏厂商一向擅长搞发明创造,除了诞生了各种烧脑奇葩游戏以外,日本主流手机游戏的核 ...
- SizeGripStyle 枚举
成员名称 说明 Auto 需要时会自动显示大小调整的箭头图标 Hide 大小调整的箭头图标被隐藏. (SizeGripStyle=Hide,禁用拖动窗体右下角可以改变大小的功能) Sho ...