regression_gradient_descent: Fit a regression gradient descent

View source: R/regression_gradient_descent.R

regression_gradient_descentR Documentation

Fit a regression gradient descent

Description

Fit a regression gradient descent

Usage

regression_gradient_descent(
  y,
  X,
  W,
  inits = NULL,
  threshold = 0.01,
  learn_rate = 0.001,
  num_iters = 10,
  print_every = 1,
  minibatch_size = NULL
)

Arguments

y

The observed data.

X

The design matrix for the fixed effects.

W

The basis matrix for the random effects.

inits

If NULL, random initialization is used. Otherwise it must be a numeric vector of length equal to the total columns of X and W.

threshold

The threshold for determining convergence.

num_iters

The number of iterations to run the gradient descent algorithm.

print_every

The number of iterations between printing the output.

minibatch_size

If NULL, the full data are used. If set as a positive numeric value, this is the number of samples used in the minibatch.

alpha

The learning rate.

Value

The output of the gradient descent algorithm


jtipton25/sgMRA documentation built on Feb. 9, 2023, 4:53 a.m.