public class IWLS extends Object implements GLMFitting
glm.fit.| Constructor and Description |
|---|
IWLS(double threshold,
int maxIterations)
Construct an instance to run the Iteratively Re-weighted Least Squares algorithm.
|
| Modifier and Type | Method and Description |
|---|---|
ImmutableVector |
betaHat()
Gets the estimates of β, β^, as in
E(Y) = μ = g-1(Xβ)
|
void |
fit(GLMProblem probelm,
Vector beta0Initial)
Fits a Generalized Linear Model.
|
double |
logLikelihood() |
ImmutableVector |
mu()
Gets μ as in
E(Y) = μ = g-1(Xβ)
|
ImmutableVector |
weights()
Gets the weights assigned to the observations.
|
public IWLS(double threshold,
int maxIterations)
threshold - the convergence thresholdmaxIterations - maximum number of iterationspublic void fit(GLMProblem probelm, Vector beta0Initial)
GLMFittingfit in interface GLMFittingprobelm - the generalized linear regression problem to be
solvedbeta0Initial - initial guess for β^public ImmutableVector mu()
GLMFittingE(Y) = μ = g-1(Xβ)
mu in interface GLMFittingpublic ImmutableVector betaHat()
GLMFittingE(Y) = μ = g-1(Xβ)
betaHat in interface GLMFittingpublic ImmutableVector weights()
GLMFittingweights in interface GLMFittingpublic double logLikelihood()
logLikelihood in interface GLMFittingCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.