Machine Learning Course 1 and 2

来源:互联网 发布:怎么弄个java服务器 编辑:程序博客网 时间:2024/06/05 09:47

What is the Machine Learning?

​ Experience E , Task T, Performance measure P

​ If its performance on T as measured by P , improves with experience E。

​ 经验 E, 任务 T, 性能度量 P。

​ 由 P 定义的关于 T 的性能随着 E经验而提高。

Machine Learning Algorithm

  • Supervised learning (监督学习, 告诉计算机什么是正确的, 什么是错误的)
  • Unsupervised learning (由计算机自己学习如何正确)
  • Reinforcement learning (增强学习)
  • Recommender Systems (推荐系统)

Supervised Learning

​ “right answers” Given

Regression: Predict continuous valued output

​ 回归问题: 预测一个连续的输出值。

Classification: Discrete valued output(0 or 1)

​ 分类问题: 预测离散的输出值。

Unsupervised Learning

​ cluster 聚类.

​ 聚类问题。

​ Clustering algorithm

Linear regression with one variable

Model representation

​ fit a model 拟合模型

···

hθ(x)=θ0+θ1x

Linear regression with one variable or univariate linear regression

​ 单变量线性回归。

hθ(x)=θ0+θ1x

θi : Parameters 模型参数。

Cost function

squared error cost function J(θ0,θ1)=12mmi=1(hθ(x(i)y(i))2 minimazeθ0,θ1J(θ0,θ1)

Gradient descent

​ 梯度下降算法, 找到 Min{J(θ0,θ1)}

repeatuntilconvergence:θj:=θjαθjJ(θ0,θ1)


Correct : Simultaneous update

temp0:=θ0αθ0J(θ0,θ1)temp1:=θ1αθ1J(θ0,θ1)θ0:=temp0;θ1:=temp1

Gradient descent algorithm

repeatuntilconvergence:θ0:=θ0α1mi=1m(hθ(x(i)y(i)))θ1:=θ1α1mi=1m(hθ(x(i)y(i)))x(i)

​ “Batch” : Each step of gradient descent uses all the training examples.

​ 每一次梯度下降,都使用所有的训练集合。

阅读全文
0 0
原创粉丝点击