GLM_gradient_adaptive: GLM_gradient_adaptive

Description Usage Arguments Details Value

View source: R/GLM_gradient_adaptive.R

Description

Implement a first-order solution for the GLM maximum likelihood problem using only gradient information, avoiding the Hessian matrix. Standard adaptive update Momentum.

Usage

1
GLM_gradient_adaptive(X, Y, mu_fun, mom = 0.2, maxit = 1e+05, tol = 1e-05)

Arguments

X

The design matrix

Y

Response variable

mu_fun

A function to use eta get mu

mom

The momentum update size, set default as 0.2

maxit

The maximum iteration times to allow the loop to exit, set default as 1e5

tol

The difference between previous beta and new beta to allow the loop to exit, set default as 1e-5.

Details

The code is adapted from lecture notes.

Value

A list of beta coefficients.


Z1chenZhao/bis557 documentation built on Dec. 21, 2020, 10:03 p.m.