Cost function $$J(\theta) = \frac{1}{2m} \sum^m{i=1} (H\theta(X^{(i)}) - y^{(i)})^2$$ $$Cost(h\theta(X), y) = \begin{cases} -log(h\theta(X)),&\text{if }y=1
-log(1-h\theta(X)),&\text{if }y=0 \end{cases} $$ P.S. Katex tips: in Hugo’s math mode, to get line separator for multi-line equations, use ‘’ $\times 6$ instead of ‘\‘. And if a function faild, add ‘’ as escape char for random ‘’s might help (annoying…I know…)
Continue reading

Here is a series of course notes migration, in order to say-goodbye to the text books and my messy physical notepads. Hypothesis model $$H_\theta(X) = \theta^T X = \theta_0\cdot 1 + \theta_1\cdot x_1 + \cdots + \theta_n\cdot xn$$ $\theta\in n+1$ column vector, $X\in (n+1)\times m$ matrix when having $m$ training cases. Cost function $$J(\theta) = \frac{1}{2m} \sum^m{i=1} (H_\theta(X^{(i)}) - y^{(i)})^2$$
Continue reading

Author's picture

lxip

唯自渡方是真渡

Data Science

MA US