吴恩达机器学习——数值评价指标

Numerical Evaluation

用数值评价指标来估计算法的执行结果 可以看出学习算法的效果。

在自然语言处理中,可用stemming software(词干提取软件)实现;在搜索引擎中搜Porter Stemmer这种软件进行词干提取。但它们都只处理单词的前几个字母。可以使用交叉验证(not error analysis)在使用词干提取和不使用词干提取条件下分别看看其结果。

Need numerical evaluation(e.g.,cross validation error) of algorithm’s performance with and without stemming.
Without stemming:5% error
With stemming:3% error
   ⟹    \implies using stemming
对于特定的问题,采用单一规则的数值评价指标——the cross validation error.
:要在交叉验证集上做。
other examples:
是否区分大小写1,e.g.
Distinguish upper vs. lower case (Mom/mom):3.2%
   ⟹    \implies 不区分

1.形成一个简单算法
2.查看错误,通过误差分析看它出现了什么失误,以此决定之后的优化方法
3.有了算法和数值评价指标后,有助于实验新的想法并验证该想法,决定自己该放弃些什么

the reversed example

For skewed class,需采用其它 Evaluation metric
Case:Cancer classification
   Model: h θ ( x ) { y = 1 if  c a n c e r y = 0 otherwise h_\theta(x)\begin{dcases} y = 1 &\text{if } cancer \\ y = 0 &\text{otherwise} \end{dcases} hθ(x){ y=1y=0if cancerotherwise
   Evaluation metric:分类误差/分类精确度
测试集只有1%的误差,而0.50%的病人have cancer。

function y = predictCancer(x)
	y = 0;	%ignore x!
return

利用上面非机器学习的算法,误差只有0.50%
⟹ \Longrightarrow 显然误差降低了,but 并未真正提升分类模型的质量

Precision/Recall

在上述例子中, y = 1 y = 1 y=1 in presence of rare class that we want to detect.

Predicted
class
Actual class
1 0
1 True Positive(真阳性) False Negative(假阴性)
0 False Positive(假阳性) True Negative(真阴性)
Precision

(Of all patients where we predicted y = 1 y = 1 y

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值