Mlearning

Mlearning Scikit, Linear-model

Linear regression model, one variable
Finding the line that best fits the data

h(x) = ax + b
h(x) = 1.3x - 18
Linear-regression

Mlearning Matplotlib, Pyplot

Draw a function graph

X = np.linspace(-2, 2, 100) 
ax.plot(X, X**2, label='f(x) = x**2') 
Linear-regression, Slope

Mlearning Algorithms, Gradient-descent

1. Initialize params for the model
2. Compute the cost function
3. Compute the gradients
4. Update params, using a learning rate
5. Repeat steps 2-4
Linear-regression

Mlearning Calculus, Derivatives

Instant speed, limit of average speeds
Derivative, rate of change of y with respect to x

f(x) = ax^2
f'(x) = 2ax
Linear-regression, Slope

Mlearning Algorithms, Linear-regression

1. Load training data
2. Choose a line for model
3. Compute errors sum
4. Minimize error
5. Make predictions
Linear-regression