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 ...
随机推荐
- bzoj 1264 基因匹配
Written with StackEdit. Description 卡卡昨天晚上做梦梦见他和可可来到了另外一个星球,这个星球上生物的\(DNA\)序列由无数种碱基排列而成(地球上只有\(4\)种) ...
- 分布式使用Redis
为什么我们做分布式使用Redis? https://www.cnblogs.com/yaodengyan/p/9717080.html 绝大部分写业务的程序员,在实际开发中使用 Redis 的时候,只 ...
- Python sh库学习
官方文档有句话"allows you to call any program",并且: helps you write shell scripts in Python by giv ...
- LeetCode Design TinyURL
原题链接在这里:https://leetcode.com/problems/design-tinyurl/description/ 题目: How would you design a URL sho ...
- verilog数组定义及其初始化
这里的内存模型指的是内存的行为模型.Verilog中提供了两维数组来帮助我们建立内存的行为模型.具体来说,就是可以将内存宣称为一个reg类型的数组,这个数组中的任何一个单元都可以通过一个下标去访问.这 ...
- win10开始键点击无效果
1.在键盘上按下win+R键,或在开始菜单图标上点击右键选择运行: 2.输入powershell,按下“确定”运行:3.在窗口里输入或复制粘贴以下命令,注意只有一行: Get-AppxPackage ...
- Laravel 5使用Laravel Excel实现Excel/CSV文件导入导出的功能详解
1.简介 本文主要给大家介绍了关于Laravel 5用Laravel Excel实现Excel/CSV文件导入导出的相关内容,下面话不多说了,来一起看看详细的介绍吧. Laravel Excel 在 ...
- path设置
查看 export declare -x HISTCONTROL="ignoredups"declare -x HISTSIZE="1000"declare - ...
- CCPC2018-湖南全国邀请赛 K 2018
K.2018 题目描述 Given a, b, c, d , find out the number of pairs of integers ( x, y ) where a ≤ x ≤ b, c ...
- 微信小程序之巧妙的封装
巧妙的封装 暴露一个访问地址xapp.config.js module.exports = { api_host: `https://a.squmo.com/yizu` } 继续引入,加暴露api.c ...