Description Usage Arguments Value Author(s) Examples
Implement gradient descent for ordinary least squares.
1 2 3 4 5 6 7 8 | gradient_descent(
form,
d,
contrasts = NULL,
iters = 1e+05,
gamma = 1e-04,
threshold = 1e-12
)
|
form |
A formula |
d |
A dataframe |
contrasts |
Contrasts argument |
iters |
Number of maximum iterations |
gamma |
The learning rate |
threshold |
Threshold for the difference between RSS of new and old betas. |
a list of beta coefficients
Yijun Yang
1 2 3 4 | ## Not run:
gradient_descent(body_mass_g ~ bill_depth_mm, penguins)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.