machine learning(13) -- solving the problem of overfitting:regularization
solving the problem of overfitting:regularization
- 发生的在linear regression上面的overfitting问题

- 发生在logistic regression上面的overfitting

- 怎么解决overfitting

- regularization: cost function of linear regression

- parameters小的话,这样hypothesis就会变得简单,这样就不会overfitting
- 一般不会对θ0进行regularization
- 上式是进行regularization的linear regression的cost function,要使上式的值取最小值
- 对这个cost function 的分析

- 由两个式子(两个目标)组成,第一个式子是为了对trainning data更好的拟合(fitting the training data),第二个式子是为了避免overfitting
- 第二个式子叫regularization term, λ叫regularization parameter, λ是为了平衡两个目标用的
- 如果 λ非常大的话(这时θ1-θn几乎为0,hypothesis变得很简单,只有常数),就会出现underfitting,对trainning data/ new data很低的fitting
- 所以并不是regularization在任何情况下(当 λ非常大的情况下),都能使model更适应new data或者training data
- The regularization term puts a penalty on the cost J,随着模型参数的增多,the penalty increases as well.
machine learning(13) -- solving the problem of overfitting:regularization的更多相关文章
- Solving the Problem of Overfitting
The Problem of Overfitting Cost Function Regularized Linear Regression Note: [8:43 - It is said that ...
- Advice for applying Machine Learning
https://jmetzen.github.io/2015-01-29/ml_advice.html Advice for applying Machine Learning This post i ...
- How do I learn mathematics for machine learning?
https://www.quora.com/How-do-I-learn-mathematics-for-machine-learning How do I learn mathematics f ...
- [C2P2] Andrew Ng - Machine Learning
##Linear Regression with One Variable Linear regression predicts a real-valued output based on an in ...
- Machine Learning - 第3周(Logistic Regression、Regularization)
Logistic regression is a method for classifying data into discrete outcomes. For example, we might u ...
- Course Machine Learning Note
Machine Learning Note Introduction Introduction What is Machine Learning? Two definitions of Machine ...
- 【Machine Learning is Fun!】1.The world’s easiest introduction to Machine Learning
Bigger update: The content of this article is now available as a full-length video course that walks ...
- [C2P1] Andrew Ng - Machine Learning
About this Course Machine learning is the science of getting computers to act without being explicit ...
- Introduction to Machine Learning
Chapter 1 Introduction 1.1 What Is Machine Learning? To solve a problem on a computer, we need an al ...
随机推荐
- social engineering toolkit
1. freebuf介绍 http://www.freebuf.com/sectool/73409.html 2. github https://github.com/trustedsec/socia ...
- Go资源被墙最快解决方案
原文链接:https://juejin.im/post/5cd945946fb9a032060c47a3,补充,最新的1.13版本go里默认就是用go module,直接设置代理即可: 注:如果没法升 ...
- 稀疏数组(java实现)
1.稀疏数组 当一个数组中大部分元素为0,或者为同一个值的数组时,可以使用稀疏数组来保存该数组. 稀疏数组的处理方法是: 1.1记录数组一共有几行几列,有多少个不同的值 1.2把具有不同值的元素的行列 ...
- 准备写个Golang开发的教程
进入golang的开发已经差不多两年了,最近打算写个Golang的教程.目的是让有开发基础,没接触过Golang的人能够愉快高效地写出Golang项目. 1 记得17年底时候,有个特别小的项目,准备试 ...
- 『Python基础』第39节 函数的返回值
1. 函数的返回值 一个函数就是封装一个功能, 这个功能一般都会有一个最终结果的. 比如写一个登录的函数, 最终登录是否成功你总得告诉我一声吧? 还有咱们之前也用过 len() 这个函数, ...
- Mybatis动态sql及分页、特殊符号
目的: mybatis动态sql(案例:万能查询) 查询返回结果集的处理 mybatis的分页运用 mybatis的特殊符号 mybatis动态sql(案例:万能查询) 根据id查询 模糊查询 (参数 ...
- 最简容器化动手小实践——再战flappybird
<Flappy Bird>是一名越南开发者所开发的游戏,这款游戏的主要内容是帮助一只小鸟穿越水管的层层阻碍,玩家所需要的只是点击屏幕从而调整小鸟的高度.而令这款游戏与众不同的是,这款游戏的 ...
- vue实现简单的点击切换颜色
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...
- 对称加密,非对称加密,数字签名,https
对称加密和非对称加密 对称加密 概念:加密秘钥和解密秘钥使用相同的秘钥(即加密和解密都必须使用同一个秘钥) 特点:一对一的双向保密通信(每一方既可用该秘钥加密,也可用该秘钥解密,非对称加密是多对一的单 ...
- Advanced REST Client 的安装
1.解压Advanced-REST-client_v3.1.9.zip到当前文件夹,得到Advanced-REST-client_v3.1.9目录 2.在Chrome浏览器中打开:chrom ...