Description Usage Arguments Examples
View source: R/gradient_descent.R
This is a function implementing gradient descent algorithm to estimate the parameters in OLS model
1 | gradient_descent(form, data, alpha, num_iters, contrasts = NULL)
|
form |
A given formula for fitting the regression |
data |
A given dataset to fit the model |
alpha |
The learning rate |
num_iters |
The number of iterations |
contrasts |
list of constasts for factor variables |
1 2 3 | library(palmerpenguins)
data(penguins)
my_fit =gradient_descent(bill_length_mm ~ ., data = penguins[,-8],alpha=0.1,num_iters=1000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.