Description Usage Arguments Value Examples
This function uses the gradient descent algorithm (matrix form) to solve the coefficients of simple linear regression with least squares error. This is an optimization algorithm to minimize a function which updates the parameters of the model. A very common statistical and ML algorithm.
1 | grad_descent(X, y, b_0, learn_rate, max_iter)
|
X |
matrix of all the predictors (excludes the column of 1's) |
y |
column vector of target (response) values |
b_0 |
parameters of model: column vector of initialized coefficients |
learn_rate |
the initialized learning rate (aka step size) |
max_iter |
the maximum number of iterations for this algorithm |
the estimated coefficients/parameters
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.