Machine learning- cross validation

Machine learning- cross validation

Cross-validation is a resampling procedure used to evaluate machine learning models on a limited data sample. The procedure has a single parameter called k that refers to the number of groups that a given data sample is to be split into. As such, the procedure is often called k-fold cross-validation.

1.用来比较不同的machine learning methods,评测methods的准确率。Cross validation is used to estimate performance of model if model get tested on real test data.
2.例如对于一个包含性别,年龄,体重,体检指标的病人数据集

  • 可以用logistics regression或k-nearest neighbour或SVM来建立模型.
  • 得到模型参数parameter的过程称之为training the algorithm
  • 检测模型的有效性的过程称之为test the algorithm
  1. 如何有效的检测
  • 把整个数据集分为训练集training data和检测集test data
  • 如果把整个数据分为四段ABCD,且数据的75%分为训练集,25%分为检测集
    ABC 训练集 D 检测集
    ABD 训练集 C 检测集
    ACD 训练集 B 检测集
    BCD 训练集 A 检测集
  • 一般而言,只需要一种方法检验模型的有效性,得到一个结果a(23,true;10 false); 如果四种数据集配对方法都用到,得到四个结果abcd,将其相加,会更到一个更为准确的模型检测结果P.
  • 比较不同算法的结果P,可以直观看出模型的优劣。
    4.将数据集分为四分, 称之为Four-Fold Cross Validation; 如果把单个数据column作为单位,每次只将单个数据作为检测集,其余作为训练集,则是“Leave One Out Cross Validation"; 类似的,整个数据集分为十份,”Ten-Fold Cross Validation";
    5.对于类似Ridge Regression 的method,tunning parameter(a parameter doesn’t estimated, but just sort of huessed),可以用Ten-Fold Cross Validation检测。

参考:
https://www.youtube.com/watch?v=fSytzGwwBVw

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值