mglm_spd_checkpoint: mglm_spd_checkpoint

Description Usage Arguments Value

View source: R/mglm_spd_checkpoint.R

Description

This is the function for continuing the MGLM algorithm from a checkpoint (useful if the model has not yet converged).

Usage

1
2
mglm_spd_checkpoint(checkpoint, maxiter = 500, enableCheckpoint = T,
  checkpointPath = "./", Memory = 0, tol = 1e-10)

Arguments

checkpoint

a checkpoint list object containing: X (the covariate data), Y (the response data), p (the current base point estimate), V (the current coefficient estimates), E (the objective function history), gnorm (the norm of the gradient history), niter (the number of iterations in the checkpoint)

maxiter

maxiter is the maximum number of iterations before the optimization algorithm stops searching for an optimum. If the algorithm stops before reaching maxiters, then the "converged" variable will be set to TRUE, otherwise it will be set to FALSE. Note that maxiter does NOT include the number of iterations loaded from the checkpoint.

enableCheckpoint

if TRUE, will create a checkpoint file at the end of each iteration. The checkpoint file may be loaded into R using load(checkpoint.rda), and then mglm_spd_checkpoint(checkpoint) can be run to continue running MGLM algorithm.

checkpointPath

path to write checkpoint.rda file (if enableCheckpoint=TRUE).

Memory

Memory is the maximum length of the returned list. This can be useful when the number of iterations needed for convergence is very large. Memory==0 gives 'unlimted' list length.

tol

tolerance for threshold below which gradient is determined to be zero (stopping condition for algorithm).

Value

returns a named list containing the following elements: p (the estimated base point on the manifold), V (the set of estimated covariate coefficient tangent vectors), E (the value of the objective function, which is the sum of squared geodesic error, at each iteration), Yhat (the fitted response values), gnorm (the norm of the gradient at each iteration), converged (a flag indicating whether the algorithm converged before maxiter was reached), MGLMsteps (number of iterations taken by the algorithm).


mrparker909/MGLMRiem documentation built on March 19, 2020, 3:37 p.m.