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 ...
随机推荐
- idea查看接口及类的关系继承(UML)图
选中接口或类 显示结果: 如果需要添加其他的接口或类:点击右键 添加需要的接口或类: 显示结果:
- JDK线程池框架Executor源码阅读
Executor框架 Executor ExecutorService AbstractExecutorService ThreadPoolExecutor ThreadPoolExecutor继承A ...
- 任务调度之Quartz.Net基础
最近公司要求将之前的系统设计文档补上,于是大家就都被分配了不同的任务,紧锣密鼓的写起了文档来.发现之前项目中使用了Quartz.Net来做一些定时任务的调度,比如定时的删除未支付的订单,定时检查支付状 ...
- Centos7.5 添加环境变量并生效
配置环境变量用户 jiangshan为例(base) [jiangshan@localhost ~]$ export PATH=$PATH:/usr/local/MATLAB/R2014a/bin/( ...
- 十分钟快速入门 Python,看完即会,不用收藏!
本文以 Eric Matthes 的<Python编程:从入门到实践>为基础,以有一定其他语言经验的程序员视角,对书中内容提炼总结,化繁为简,将这本书的精髓融合成一篇10分钟能读完的文章. ...
- 算法两数之和 python版
方法一.暴力解法 -- 5s 复杂度分析:时间复杂度:O(n^2)空间复杂度:O(1) length = len(nums)for i in range(length): for j in ra ...
- SQL——INSERT INTO(增)
一.INSERT INTO语句的基本用法 INSERT INTO 语句用于往表中插入新记录. student表: INSERT INTO语句有2种语法格式: 1.不指定列名,直接插入记录. 语法格式如 ...
- IIS不能下载config配置文件的解决方法
之前作程序升级的时候,需要从服务端下载后缀为config的配置文件,结果程序抛出404异常.后来百度才知道,是IIS禁止下载config文件的原因.在这里记录一下解决方法. 在我的电脑,右键管理,打开 ...
- C#笔试题目总结
基础 知识点 try catch finally的执行顺序(有return的情况下): 不管有没有出现异常,finally块中代码都会执行: 当try和catch中有return时,finally仍然 ...
- 转 winfrom组件圆角
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...