public class GLMModel extends hex.Model<GLMModel,GLMModel.GLMParameters,GLMModel.GLMOutput>
Modifier and Type | Class and Description |
---|---|
static class |
GLMModel.GLMOutput |
static class |
GLMModel.GLMParameters |
static class |
GLMModel.Submodel |
Modifier and Type | Field and Description |
---|---|
double |
_lambda_max |
long |
_nobs |
double |
_ymu |
double |
_ySigma |
Constructor and Description |
---|
GLMModel(water.Key selfKey,
GLMModel.GLMParameters parms,
GLM job,
double ymu,
double ySigma,
double lambda_max,
long nobs,
boolean hasWeights,
boolean hasOffset) |
Modifier and Type | Method and Description |
---|---|
double[] |
beta() |
long |
checksum_impl() |
java.util.HashMap<java.lang.String,java.lang.Double> |
coefficients()
get beta coefficients in a map indexed by name
|
DataInfo |
dinfo() |
water.util.TwoDimTable |
generateSummary(water.Key train,
int iter)
Re-do the TwoDim table generation with updated model.
|
static GLMModel |
makeGLMModel(GLMModel.GLMParameters.Family fam,
double[] coefficients,
java.lang.String[] predictors,
java.lang.String response)
Make GLM model with given coefficients (predictors can be numeric only at the moment)
Example: @see GLMTest.testMakeModel().
|
hex.ModelMetrics.MetricBuilder |
makeMetricBuilder(java.lang.String[] domain) |
java.lang.String[] |
names() |
double[] |
score0(water.fvec.Chunk[] chks,
int row_in_chunk,
double[] tmp,
double[] preds) |
protected double[] |
score0(double[] data,
double[] preds) |
protected double[] |
score0(double[] data,
double[] preds,
double w,
double o) |
void |
setSubmodel(GLMModel.Submodel sm) |
protected boolean |
toJavaCheckTooBig() |
protected water.util.SB |
toJavaInit(water.util.SB sb,
water.util.SB fileContext) |
protected void |
toJavaPredictBody(water.util.SB body,
water.util.SB classCtx,
water.util.SB file) |
adaptTestForTrain, adaptTestForTrain, addMetrics, addWarning, cleanup_adapt, defaultThreshold, getPublishedKeys, isSupervised, remove_impl, score, score, score, score0, scoreImpl, testJavaScoring, toJava, toJava, toJavaNCLASSES, toJavaPROB, toJavaSuper
delete_and_lock, delete, delete, delete, read_lock, read_lock, unlock_all, unlock, update, write_lock
checksum, getBinarySerializer, remove, remove, remove, remove
public final double _lambda_max
public final double _ymu
public final double _ySigma
public final long _nobs
public GLMModel(water.Key selfKey, GLMModel.GLMParameters parms, GLM job, double ymu, double ySigma, double lambda_max, long nobs, boolean hasWeights, boolean hasOffset)
protected boolean toJavaCheckTooBig()
toJavaCheckTooBig
in class hex.Model<GLMModel,GLMModel.GLMParameters,GLMModel.GLMOutput>
public DataInfo dinfo()
public hex.ModelMetrics.MetricBuilder makeMetricBuilder(java.lang.String[] domain)
makeMetricBuilder
in class hex.Model<GLMModel,GLMModel.GLMParameters,GLMModel.GLMOutput>
public double[] beta()
public java.lang.String[] names()
public java.util.HashMap<java.lang.String,java.lang.Double> coefficients()
public void setSubmodel(GLMModel.Submodel sm)
public water.util.TwoDimTable generateSummary(water.Key train, int iter)
public static GLMModel makeGLMModel(GLMModel.GLMParameters.Family fam, double[] coefficients, java.lang.String[] predictors, java.lang.String response)
fam
- - glm family, always uses canonical linkcoefficients
- - vector of coefficients, assumed the same order as predictor names, intercept in the endpredictors
- - NAmes of predictor columns, does not include Interceptpublic long checksum_impl()
checksum_impl
in class hex.Model<GLMModel,GLMModel.GLMParameters,GLMModel.GLMOutput>
public double[] score0(water.fvec.Chunk[] chks, int row_in_chunk, double[] tmp, double[] preds)
score0
in class hex.Model<GLMModel,GLMModel.GLMParameters,GLMModel.GLMOutput>
protected double[] score0(double[] data, double[] preds)
score0
in class hex.Model<GLMModel,GLMModel.GLMParameters,GLMModel.GLMOutput>
protected double[] score0(double[] data, double[] preds, double w, double o)
score0
in class hex.Model<GLMModel,GLMModel.GLMParameters,GLMModel.GLMOutput>
protected void toJavaPredictBody(water.util.SB body, water.util.SB classCtx, water.util.SB file)
toJavaPredictBody
in class hex.Model<GLMModel,GLMModel.GLMParameters,GLMModel.GLMOutput>
protected water.util.SB toJavaInit(water.util.SB sb, water.util.SB fileContext)
toJavaInit
in class hex.Model<GLMModel,GLMModel.GLMParameters,GLMModel.GLMOutput>