监督学习分类:Supervised learning:
1>regression problem: predict real-value output
2>classification problem: predict discrete-value output
约定符号:
Dataset—training set
M = number of training examples
X’s = “input” variable/features
Y’s = “output” variable/“target” variable
(x,y) = one training example
(x^I, y^I) = i th training example
假设函数:Hypothesis: h
代价函数:Cost function:(1/(2M))(预期值与实际值平方差的和)
两函数的区别:假设函数(hypothesis)是关于X的函数,代价函数(cost)是关于参数theta的函数
机器学习目标:goal:minimize(cost function)
梯度下降算法:gradient descent:
keep changing parameters to reduce cost function until we hopefully end up at a minimum
梯度下降注意:
1/gradient descent需要同时更新所有参数
2/gradient descent的step会在接近局部最低点时自动减小
梯度下降下降算法中Batch:Each step of gradient descent uses all the training example.