Description Usage Arguments Value Examples
View source: R/my_lm_gd_out_of_sample.R
OLS using gradient descent and compute out-of-sample error
1 | my_lm_gd_out_of_sample(form, d, eta = 0.05, iters = 1e+05, seed = 1234)
|
form |
A formula specifying the model. |
d |
A dataframe. |
eta |
Learning rate. Default is 0.05. |
iters |
Total iterations. |
seed |
A number controlling the random sampling. |
A list with fitted coefficients and out-of-sample mean squared error
1 | my_lm_gd_out_of_sample(Sepal.Length~.,iris,eta=0.05,iters=100000,seed=1234)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.