“ML”的版本间的差异

来自个人维基
跳转至: 导航搜索
Multivariate Linear Regression
Multivariate Linear Regression
第19行: 第19行:
 
=Week2=
 
=Week2=
 
==Multivariate Linear Regression==
 
==Multivariate Linear Regression==
<math>h_&theta;(x) = &theta;_0x_0 + &theta;_1x_1 + &theta;_2x_2 + ... + &theta;_nx_n = &theta;^Tx</math>
+
<math>h_&theta;(x) = &theta;_0x_0 + &theta;_1x_1 + &theta;_2x_2 + ... + &theta;_nx_n</math>
 +
::<math> = [&theta;_0x_0^{(1)}, &theta;_0x_0^{(2)}, ..., &theta;_0x_0^{(m)}] + [&theta;_1x_1^{(1)}, &theta;_1x_1^{(2)}, ..., &theta;_1x_1^{(m)}] + ... + [&theta;_nx_n^{(1)}, &theta;_nx_n^{(2)}, ..., &theta;_nx_n^{(m)}] </math>
 +
::<math> = [&theta;_0x_0^{(1)}+&theta;_1x_1^{(1)}+...+&theta;_nx_n^{(1)}, \ \ \ &theta;_0x_0^{(2)}+&theta;_1x_1^{(2)}+...+&theta;_nx_n^{(2)}, \ \ \ &theta;_0x_0^{(m)}+&theta;_1x_1^{(m)}+...+&theta;_nx_n^{(m)}] </math>
 +
::<math> = &theta;^Tx</math>
 
其中,
 
其中,
 
<math>
 
<math>

2018年12月21日 (五) 18:47的版本

目录

 [隐藏

Week1

Cost Function损失函数

Squared error function/Mean squared function均方误差:
Cross entropy交叉熵:

Gradient Descent梯度下降


对于线性模型,其损失函数为均方误差,故有(这里输入训练数据x为m*n矩阵, 线性参数为n*1,代表训练矩阵中的第i行,代表第i行第k列):

对于j>=1:

Week2

Multivariate Linear Regression

其中,

m为训练数据组数,n为特征个数(通常,为了方便处理,会令

Feature Scaling & Standard Normalization


其中,是第i个特征数据x_i的均值,而 则要视情况而定:

  • Feature Scaling:中最大值与最小值的差(max-min);
  • Standard Normalization:中数据标准差(standard deviation)。