Difference between revisions of "Linear Methods"

From Bitnami MediaWiki
Jump to navigation Jump to search
Line 1: Line 1:
 +
===Metrics===
 
Primary purpose is to minimize some error metric:
 
Primary purpose is to minimize some error metric:
  
Line 8: Line 9:
  
 
<math>\|\textbf{v}\|_k = (|v_0|^k + |v_1|^k + \dots + |v_n|^k)^{1/k} </math>
 
<math>\|\textbf{v}\|_k = (|v_0|^k + |v_1|^k + \dots + |v_n|^k)^{1/k} </math>
 +
 +
===Linear Regression===
 +
<math>\hat{y} = \theta_0 + \theta_1x_1 + \theta_2x_2 + \cdots + \theta_nx_n</math>

Revision as of 19:23, 6 February 2021

Metrics

Primary purpose is to minimize some error metric:

[math]\displaystyle{ \displaystyle \textrm{RMSE(}\textbf{X}\textit{,h}) = \sqrt{\dfrac{1}{m} \sum^m_{i=1}(h(\textbf{x}^{(i)} - y^{(i)})^2} }[/math]

[math]\displaystyle{ \displaystyle \textrm{MAE(}\textbf{X}\textit{,h}) = \dfrac{1}{m}\sum^m_{i=1} | h(\textbf{x}^{(i)} - y^{(i)} }[/math]

RMSE gives the Euclidean norm, [math]\displaystyle{ \ell_2 }[/math]. MAE gives the Manhattan norm, [math]\displaystyle{ \ell_1 }[/math]. A higher norm index overweights large values relative to small ones. This makes RMSE more sensitive to outliers than MAE. In general,

[math]\displaystyle{ \|\textbf{v}\|_k = (|v_0|^k + |v_1|^k + \dots + |v_n|^k)^{1/k} }[/math]

Linear Regression

[math]\displaystyle{ \hat{y} = \theta_0 + \theta_1x_1 + \theta_2x_2 + \cdots + \theta_nx_n }[/math]