CS 229 notes Supervised Learning

CS 229 notes Supervised Learning

标签(空格分隔): 监督学习 线性代数


Forword

the proof of Normal equation and, before that, some linear algebra equations, which will be used in the proof.

The normal equation

Linear algebra preparation

For two matrices and such that is square, .

Proof:

Some properties:

some facts of matrix derivative:

Proof:


Proof 1:

Proof 2:

Proof:
( refers to the cofactor)

Least squares revisited

(if we don’t include the intercept term)

since ,

Thus,
$\frac{1}{2}(X\theta-\vec{y})^T(X\theta-\vec{y}) =
\frac{1}{2}\displaystyle{\sum{i=1}^{m}(h\theta(x^{(i)}) -y^{(i)})^2} = J(\theta) $.

Combine Equations

Hence

Notice it is a real number, or you can see it as a matrix, so

since and involves no elements.
then use equation with

To minmize , we set its derivative to zero, and obtain the normal equation:

?

时间: 2024-08-28 22:33:28

CS 229 notes Supervised Learning的相关文章

Machine Learning Algorithms Study Notes(2)--Supervised Learning

Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 2    Supervised Learning    3 2.1    Perceptron Learning Algorithm (PLA)    3 2.1.1    PLA -- "知错能改"演算法    4 2.2    Linear Regression    6 2.2.1    线性回归模型    6 2.2.2    最小二乘法( le

Machine Learning Algorithms Study Notes(3)--Learning Theory

Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 本系列文章是Andrew Ng 在斯坦福的机器学习课程 CS 229 的学习笔记. Machine Learning Algorithms Study Notes 系列文章介绍 3 Learning Theory 3.1 Regularization and model selection 模型选择问题:对于一个学习问题,可以有多种模型选择.比如要拟合一组样本点,

1. Supervised Learning - Linear Regression

Linear Regression线性回归 Notation 给定一个样本集T 样本总数为m 每个样本记做 其中为输入变量,也称为特征变量:为我们要预测的输出变量,也称为目标变量 表示第个样本. 问题描述 给定一个样本集,学习一个函数 使得是对相应y的一个好的预测. 因为某些历史原因,h被称为假设(hypothesis). 整个过程如下图所示: 如果我们想要预测的目标变量是连续值,称为回归问题(regression): 当目标变量是少数离散值时,称为分类问题(classification). 如

2. Supervised Learning - Logistic Regression

Logistic Regression 逻辑回归解决问题类型 二分类问题(classification) Notation 给定一个样本集T 样本总数为m 每个样本记做 其中为输入变量,也称为特征变量:为我们要预测的输出变量,也称为目标变量 表示第个样本. Hypothesis的作用是,对于给定的输入变量,根据选择的参数计算输出变量=1的可能性 也就是 最终,当大于等于0.5时,预测y=1,当小于0.5时,预测y=0 假设是一下形式: 其中称为Logistic函数或者sigmoid函数,函数图象

Supervised Learning 的本质

转载自知乎:http://www.zhihu.com/question/23194489   但根据知乎惯例,答案还是要继续扩展的. 首先看什么是学习(learning)?一个成语就可概括:举一反三.此处以高考为例,高考的题目在上考场前我们未必做过,但在高中三年我们做过很多很多题目,懂解题方法,因此考场上面对陌生问题也可以算出答案.机器学习的思路也类似:我们能不能利用一些训练数据(已经做过的题),使机器能够利用它们(解题方法)分析未知数据(高考的题目)? 最简单也最普遍的一类机器学习算法就是分类

(转载)[机器学习] Coursera ML笔记 - 监督学习(Supervised Learning) - Representation

[机器学习] Coursera ML笔记 - 监督学习(Supervised Learning) - Representation http://blog.csdn.net/walilk/article/details/50922854

【转载】Torch7 教程 Supervised Learning CNN

Torch7 教程 Supervised Learning CNN 分类:             机器学习              2014-08-08 15:59     1426人阅读     评论(0)     收藏     举报 cnnbpdeep learning 全部代码放在:https://github.com/guoyilin/CNN_Torch7 在搭建好Torch7之后,我们开始进行监督式Supervised Learning for CNN, Torch7提供了代码和一

A Brief Review of Supervised Learning

There are a number of algorithms that are typically used for system identification, adaptive control, adaptive signal processing, and machine learning. These algorithms all have particular similarities and differences. However, they all need to proce

Stanford机器学习课程笔记(1) Supervised Learning and Unsupervised Learning

最近跟完了Andrew Ng的Machine Learning前三周的课,主要讲解了机器学习中的线性回归(Linear Regression)和逻辑回归(Logistic Regression)模型.在这里做一下记录. 另外推荐一本统计学习的书,<统计学习方法>李航,书短小精悍,才200多页,但是内容基本上覆盖了机器学习中的理论基础. 笔记<1> 主要了解一下监督学习和无监督学习 机器学习:是关于计算机基于数据 构建概率统计模型 并运用模型对数据进行预测与分析的一门学科. 机器学习