MACHINE LEARNING FROM SCRATCH

$$y = A\times x + B$$
$$B =\frac{\Sigma^{n}_{i}(x_{i}-mean(x))(y_{i}-mean(y))}{\Sigma^{n}_{i}(x_{i}-mean(x))^{2}}$$
$$A = mean(y) - B \times mean(x)$$
$$y = A\times x + B$$
$$A_{t+1} = A_{t} - \alpha \times error \times x$$
$$B_{t+1} = B_{t} - \alpha \times error$$
$$error = pred - y$$
$$y = \frac{1}{exp^{-(Ax^1+Bx^2+C)}}$$
$$y = \frac{1}{exp^{-(Ax^1+Bx^2+C)}}$$
$$discriminant(x) = x \times \frac{mean}{variance} - \frac{mean^2}{2 \times variance} + ln(probability)$$
$$Gini = ((1-(g11^2+g12^2)) \times \frac{ng1}{n}) + ((1-(g21^2+g22^2)) \times \frac{ng2}{n})$$
$$P(a|b) = \frac{P(b|a) \times P(a)}{P(b)}$$
$$distance(p1,p2) = \sqrt{\Sigma^{n}_{i=1}(p1_i-p2_i)^2}$$
$$output = Y \times ((A1 \times X1) + (A1 \times X2))$$
$$output>1 : (1-1/t) \times A1 $$
$$output<1 : (1-1/t) \times A1+(y \times x) \times 1/(lambda \times t) $$
$$prediction = mode(pred1, pred2, pred3)$$
$$misclassification = \frac{\Sigma^n_{i=1}(w_i \times error_i)}{\Sigma^n_{i=1}w}$$
$$weight = \frac{1}{N}$$
$$error_{weighted} = weight \times error$$
$$stage = ln \frac{1-misclassification}{misclassification}$$