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如何以追加的方式向文件中写入信息?
以FileWriter类为例: FileWriter的构造方法中有一个方法是:FileWriter(String fileName, boolean append) ,其中第二个参数决定了写文件的方 ...
- latch的产生和消除
一直都知道fpga中有latch这么一回事,但是一直都不太清楚到底什么是锁存器,它是怎么产生的,它到底和寄存器有多少区别,它怎么消除.为什么说他不好? 一,是什么 锁存器是一种在异步时序电路系统中,对 ...
- LA3218 Find the Border
题意 PDF 分析 虽然只找外轮廓,但是时间复杂度不比PSLG优秀,所以可以当做联系PSLG的题做. PSLG框架 找出所有交点 交点按序连边 把边按极角序排序 逆时针找圈 然后何以会顺时针找出无限区 ...
- 11.7noip模拟赛
题解:广义斐波那契数列 矩阵乘法 #include<iostream> #include<cstdio> #include<cstring> #define LL ...
- [WPF]控件应用多个样式(转)
最近在做WPF项目,公司没有专门的UI工程师,什么都要自己做.接触WPF已经有好几年了,自定义样式什么的也可以做一些.WPF在使用样式的时候一般都是 Style="{StaticResour ...
- Linux下搭建 NFS
一.NFS简介 NFS是Network File System的缩写,即网络文件系统.一种使用于分散式文件协定,有SUN公司开发.功能是通过网络让不同的机器.不同的操作系统能够分享个人数据,让应用程序 ...
- 程序或-内存区域分配& ELF分析 ***
一.在学习之前我们先看看ELF文件. ELF分为三种类型: 1. .o 可重定位文件(relocalble file) 2. 可执行文件 3. 共享库(shared library) 三种格式基本上从 ...
- php sprintf()
在写php代码的时候,有时候会用到sprintf()这个函数,那么它是怎么用的呢? 学习源头: http://www.w3school.com.cn/php/func_string_sprintf.a ...
- 基于ASIHTTPRequest封装的HttpClient
ASIHTTPRequest作为一个比较知名的http访问库本身功能比较强大,在项目开发过程中,如果每个请求,都要使用ASIHTTPRequest来写,有以下几个弊端: (1)繁琐,无封装性. (2) ...
- 转载:Oracle RAC日常基本维护命令
本文转载自: https://blog.csdn.net/tianlesoftware/article/details/5358573 Oracle RAC日常基本维护命令 好文转载, Oracle ...