Different types of Functions

  1. Regression: The function outputs a scalar

  2. Classification: Given options(classes),the function outputs the correct one

  3. Structured Learning

1. Function with Unknown Parameters

Model 在机器学习中就是带有未知的Parameter的function;

w: weight b: bias

2. Define Loss from Training Data

Loss is a function of parameter: L(b,w)L(b,w)

Loss: L=1Ni=1nenL=\frac{1}{N}\sum_{i=1}^n{e_n} ene_n为每次误差

e=yyˉe=|y-\bar{y}| L is mean absolute error(MAE) 绝对误差

e=(yyˉ)2e=(y-\bar{y})^2 L is mean square error(MSE) 平方误差

寻找一个最合适的b和w,使得L最低

3. Optimization

Gradient Descent : 梯度下降

All Piecewise Linear Curves = constant + sum of a set of

sigmod : S型的function