Description Usage Arguments Examples
This function implements gradient descent GLM using the momentum algorithm
1 | glm_momentum(X, Y, mu_fun, max_n, lr, gamma = 0.8, tol = 1e-10)
|
X |
a model matrix, the X variables as columns |
Y |
a factor vector, the response variable |
mu_fun |
a function depending on Xbeta, giving the mean of the link function |
max_n |
max number of iterations (a positive integer) |
lr |
the learning rate |
gamma |
the constant weight of the past update (a positive number) |
tol |
the difference threshold for which we will exit the algorithm for iterations less than max_n |
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.