Description Usage Arguments Value Author(s) Examples
Implement a new function fitting the OLS model using gradient descent that calculates the penalty based on the out-of-sample accuracy.
1 2 3 4 5 6 7 8 | gradient_descent_new(
form,
d,
contrasts = NULL,
iters = 5e+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_new(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.