[ 机器学习
Posted Deep_RS
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[ 机器学习相关的知识,希望对你有一定的参考价值。
房价训练集(俄勒冈州,波特兰市)
Size in \\(feet^2\\) (x) | Price ($) in 1000\'s (y) |
---|---|
2104 | 460 |
1416 | 232 |
1534 | 315 |
852 | 178 |
假设函数: \\(h_\\theta(x) = \\theta_0 + \\theta_1x\\)
参数:\\(\\theta_i\'s\\)
如何选择 \\(\\theta_i\'s\\)?
想法:对于我们的训练样例 \\((x, y)\\),选择\\(\\theta_0, \\theta_1\\),使\\(h_\\theta(x)\\)靠近\\(y\\)
Cost Function 损失函数
\\[J(\\theta_0,\\theta_1) = 1/2m\\sum_i=1^m(h_\\theta(x^(i)) - y^(i))^2
\\]
m:训练样本数
总结
假设函数
\\[h_\\theta(x) = \\theta_0 + \\theta_1x
\\]
参数: \\(\\theta_0, \\theta_1\\)
损失函数: 均方误差函数(Squared error function)**
\\[J(\\theta_0,\\theta_1) = 1/2m\\sum_i=1^m(h_\\theta(x^(i)) - y^(i))^2
\\]
目标: \\(\\beginmatrix minimize J(\\theta_0,\\theta_1)\\\\ \\theta_0,\\theta_1 \\endmatrix\\)
简化:
假设函数:
\\[h_\\theta(x) = \\theta_1x
\\]
参数: \\(\\theta_1\\)
损失函数:
\\[J(\\theta_1) = 1/2m\\sum_i=1^m(h_\\theta(x^(i)) - y^(i))^2
\\]
目标: \\(\\beginmatrix minimize J(\\theta_1)\\\\ \\theta_1 \\endmatrix\\)
以上是关于[ 机器学习的主要内容,如果未能解决你的问题,请参考以下文章