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)
GLMFitting
fit
in interface GLMFitting
probelm
- the generalized linear regression problem to be
solvedbeta0Initial
- initial guess for β^public ImmutableVector mu()
GLMFitting
E(Y) = μ = g-1(Xβ)
mu
in interface GLMFitting
public ImmutableVector betaHat()
GLMFitting
E(Y) = μ = g-1(Xβ)
betaHat
in interface GLMFitting
public ImmutableVector weights()
GLMFitting
weights
in interface GLMFitting
public double logLikelihood()
logLikelihood
in interface GLMFitting
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.