
Mini-batch stochastic gradient descent for OLS (R parity)
Source:R/mbgrd.R
morie_mini_batch_gradient.RdMini-batch stochastic gradient descent for OLS (R parity)
Examples
morie_mini_batch_gradient(x = rnorm(50), y = rnorm(50))
#> $estimate
#> [1] 0.094061748 -0.007426231
#>
#> $reference_ols
#> [1] 0.08631204 -0.01766537
#>
#> $n_epochs
#> [1] 200
#>
#> $batch_size
#> [1] 32
#>
#> $loss
#> [1] 0.7439499
#>
#> $n
#> [1] 50
#>
#> $method
#> [1] "Mini-batch SGD (linear regression)"
#>