public class GAMModel extends hex.Model<GAMModel,GAMModel.GAMParameters,GAMModel.GAMModelOutput>
Modifier and Type | Class and Description |
---|---|
static class |
GAMModel.GAMModelOutput |
static class |
GAMModel.GAMParameters |
hex.Model.AdaptFrameParameters, hex.Model.BigScore, hex.Model.BigScoreChunkPredict, hex.Model.BigScorePredict, hex.Model.Contributions, hex.Model.DeepFeatures, hex.Model.ExemplarMembers, hex.Model.FeatureFrequencies, hex.Model.GetMostImportantFeatures, hex.Model.GetNTrees, hex.Model.GLRMArchetypes, hex.Model.GridSortBy, hex.Model.H2OModelDescriptor, hex.Model.InteractionBuilder, hex.Model.InteractionPair, hex.Model.InteractionSpec, hex.Model.JavaModelStreamWriter, hex.Model.JavaScoringOptions, hex.Model.LeafNodeAssignment, hex.Model.Output, hex.Model.Parameters, hex.Model.PredictScoreResult, hex.Model.RowToTreeAssignment, hex.Model.StagedPredictions, hex.Model.UpdateAuxTreeWeights
Modifier and Type | Field and Description |
---|---|
int |
_cubicSplineNum |
double[] |
_gamColMeans |
java.lang.String[][] |
_gamColNames |
java.lang.String[][] |
_gamColNamesNoCentering |
water.Key<water.fvec.Frame>[] |
_gamFrameKeysCenter |
int[] |
_gamPredSize |
int |
_iSplineNum |
int[] |
_m |
int[] |
_M |
int |
_mSplineNum |
int |
_nclass |
long |
_nobs |
long |
_nullDOF |
int |
_rank |
int |
_thinPlateSmoothersWithKnotsNum |
water.util.IcedHashSet<water.Key<water.fvec.Frame>> |
_validKeys |
double[] |
_ymu |
Constructor and Description |
---|
GAMModel(water.Key<GAMModel> selfKey,
GAMModel.GAMParameters parms,
GAMModel.GAMModelOutput output) |
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
adaptTestForTrain(water.fvec.Frame test,
boolean expensive,
boolean computeMetrics)
This method will massage the input training frame such that it can be used for scoring for a GAM model.
|
static water.fvec.Frame |
adaptValidFrame(water.fvec.Frame adptedF,
water.fvec.Frame valid,
GAMModel.GAMParameters parms,
java.lang.String[][] gamColNames,
double[][][] binvD,
double[][][] zTranspose,
double[][][] knots,
double[][][] zTransposeCS,
int[][][] polyBasisList,
double[][] gamColMeansRaw,
double[][] oneOGamColStd,
int[] singleGAMArrays) |
static water.fvec.Frame |
addSingleVariableGamColumns(water.fvec.Frame adptedF,
GAMModel.GAMParameters parms,
java.lang.String[][] gamColNames,
double[][][] binvD,
double[][][] zTranspose,
double[][][] knots,
int[] singleGAMColArrays) |
static water.fvec.Frame |
addTPGamColumns(water.fvec.Frame adaptedF,
GAMModel.GAMParameters parms,
double[][][] zTransposeCS,
double[][][] zTranspose,
int[][][] polyBasisList,
double[][][] knots,
double[][] gamColMeansRaw,
double[][] oneOColStd) |
water.fvec.Frame |
cleanUpInputFrame(water.fvec.Frame test) |
static water.fvec.Frame |
cleanUpInputFrame(water.fvec.Frame adptedF,
GAMModel.GAMParameters parms,
java.lang.String[][] gamColNames,
double[][][] binvD,
double[][][] zTranspose,
double[][][] knots,
double[][][] zTransposeCS,
int[][][] polyBasisList,
double[][] gamColMeansRaw,
double[][] oneOGamColStd,
int[] singleSplineNum) |
water.util.TwoDimTable |
genCoefficientMagTable(java.lang.String[] colHeaders,
double[] coefficients,
java.lang.String[] coefficientNames,
java.lang.String tableHeader) |
water.util.TwoDimTable |
genCoefficientMagTableMultinomial(java.lang.String[] colHeaders,
double[][] coefficients,
java.lang.String[] coefficientNames,
java.lang.String tableHeader) |
GAMMojoWriter |
getMojo() |
void |
initActualParamValuesAfterGlmCreation() |
hex.ModelMetrics.MetricBuilder |
makeMetricBuilder(java.lang.String[] domain) |
java.lang.String[] |
makeScoringNames() |
protected hex.Model.PredictScoreResult |
predictScoreImpl(water.fvec.Frame fr,
water.fvec.Frame adaptFrm,
java.lang.String destination_key,
water.Job j,
boolean computeMetrics,
water.udf.CFuncRef customMetricFunc) |
protected water.Keyed |
readAll_impl(water.AutoBuffer ab,
water.Futures fs) |
protected water.Futures |
remove_impl(water.Futures fs,
boolean cascade) |
double[] |
score0(double[] data,
double[] preds) |
protected hex.ModelMetrics.MetricBuilder |
scoreMetrics(water.fvec.Frame adaptFrm)
Score on an already adapted validation frame during cross validation.
|
protected java.lang.String[][] |
scoringDomains() |
protected water.AutoBuffer |
writeAll_impl(water.AutoBuffer ab) |
adaptFrameForScore, adaptTestForJavaScoring, adaptTestForTrain, adaptTestForTrain, addMetrics, addModelMetrics, addWarning, aic, auc, AUCPR, checksum_impl, classification_error, compareTo, computeDeviances, containsResponse, data, defaultThreshold, defaultThreshold, deleteCrossValidationFoldAssignment, deleteCrossValidationModels, deleteCrossValidationPreds, deviance, deviance, evaluateAutoModelParameters, exportBinaryModel, exportMojo, fetchAll, fillScoringInfo, getDefaultGridSortBy, getGenModelEncoding, getPojoInterfaces, getToEigenVec, haveMojo, havePojo, importBinaryModel, initActualParamValues, isDistributionHuber, isFeatureUsedInPredict, isFeatureUsedInPredict, isGeneric, isSupervised, last_scored, lift_top_group, likelihood, logloss, loss, mae, makeAdaptFrameParameters, makeBigScoreTask, makeInteraction, makeInteractions, makeInteractions, makePojoWriter, makeSchema, makeScoringDomains, makeScoringNames, mean_per_class_error, modelDescriptor, mse, needsPostProcess, postProcessPredictions, r2, resetThreshold, result, rmsle, score, score, score, score, score, score, score, score, score0, score0, score0, score0PostProcessSupervised, scoring_history, setInputParms, setupBigScorePredict, testJavaScoring, testJavaScoring, testJavaScoring, testJavaScoring, testJavaScoring, toJava, toJava, toJava, toJavaAlgo, toJavaCheckTooBig, toJavaInit, toJavaModelClassName, toJavaPredictBody, toJavaTransform, toJavaUUID, toMojo, toMojo, toString, transform, uploadBinaryModel, writeTo
delete_and_lock, delete_and_lock, delete_and_lock, delete_and_lock, delete, delete, delete, delete, read_lock, read_lock, read_lock, unlock_all, unlock, unlock, unlock, unlock, update, update, update, write_lock_to_read_lock, write_lock, write_lock, write_lock
checksum_impl, checksum, checksum, getKey, readAll, remove_impl, remove_self_key_impl, remove, remove, remove, remove, remove, remove, removeQuietly, writeAll
public java.lang.String[][] _gamColNamesNoCentering
public java.lang.String[][] _gamColNames
public int[] _gamPredSize
public int[] _m
public int[] _M
public int _cubicSplineNum
public int _iSplineNum
public int _mSplineNum
public int _thinPlateSmoothersWithKnotsNum
public water.Key<water.fvec.Frame>[] _gamFrameKeysCenter
public double[] _gamColMeans
public int _nclass
public double[] _ymu
public long _nobs
public long _nullDOF
public int _rank
public water.util.IcedHashSet<water.Key<water.fvec.Frame>> _validKeys
public GAMModel(water.Key<GAMModel> selfKey, GAMModel.GAMParameters parms, GAMModel.GAMModelOutput output)
public java.lang.String[] makeScoringNames()
makeScoringNames
in class hex.Model<GAMModel,GAMModel.GAMParameters,GAMModel.GAMModelOutput>
public hex.ModelMetrics.MetricBuilder makeMetricBuilder(java.lang.String[] domain)
makeMetricBuilder
in class hex.Model<GAMModel,GAMModel.GAMParameters,GAMModel.GAMModelOutput>
public void initActualParamValuesAfterGlmCreation()
public water.util.TwoDimTable genCoefficientMagTableMultinomial(java.lang.String[] colHeaders, double[][] coefficients, java.lang.String[] coefficientNames, java.lang.String tableHeader)
public water.util.TwoDimTable genCoefficientMagTable(java.lang.String[] colHeaders, double[] coefficients, java.lang.String[] coefficientNames, java.lang.String tableHeader)
protected hex.ModelMetrics.MetricBuilder scoreMetrics(water.fvec.Frame adaptFrm)
scoreMetrics
in class hex.Model<GAMModel,GAMModel.GAMParameters,GAMModel.GAMModelOutput>
adaptFrm
- Already adapted frame with gamified columnsprotected java.lang.String[][] scoringDomains()
scoringDomains
in class hex.Model<GAMModel,GAMModel.GAMParameters,GAMModel.GAMModelOutput>
public java.lang.String[] adaptTestForTrain(water.fvec.Frame test, boolean expensive, boolean computeMetrics)
adaptTestForTrain
in class hex.Model<GAMModel,GAMModel.GAMParameters,GAMModel.GAMModelOutput>
test
- Testing Frame, updated in-placeexpensive
- Try hard to adapt; this might involve the creation of
whole Vecs and thus get expensive. If false
, then only adapt if
no warnings and errors; otherwise just the messages are produced.
Created Vecs have to be deleted by the caller (e.g. Scope.enter/exit).computeMetrics
- public water.fvec.Frame cleanUpInputFrame(water.fvec.Frame test)
public static water.fvec.Frame cleanUpInputFrame(water.fvec.Frame adptedF, GAMModel.GAMParameters parms, java.lang.String[][] gamColNames, double[][][] binvD, double[][][] zTranspose, double[][][] knots, double[][][] zTransposeCS, int[][][] polyBasisList, double[][] gamColMeansRaw, double[][] oneOGamColStd, int[] singleSplineNum)
public static water.fvec.Frame adaptValidFrame(water.fvec.Frame adptedF, water.fvec.Frame valid, GAMModel.GAMParameters parms, java.lang.String[][] gamColNames, double[][][] binvD, double[][][] zTranspose, double[][][] knots, double[][][] zTransposeCS, int[][][] polyBasisList, double[][] gamColMeansRaw, double[][] oneOGamColStd, int[] singleGAMArrays)
public static water.fvec.Frame addTPGamColumns(water.fvec.Frame adaptedF, GAMModel.GAMParameters parms, double[][][] zTransposeCS, double[][][] zTranspose, int[][][] polyBasisList, double[][][] knots, double[][] gamColMeansRaw, double[][] oneOColStd)
public static water.fvec.Frame addSingleVariableGamColumns(water.fvec.Frame adptedF, GAMModel.GAMParameters parms, java.lang.String[][] gamColNames, double[][][] binvD, double[][][] zTranspose, double[][][] knots, int[] singleGAMColArrays)
protected hex.Model.PredictScoreResult predictScoreImpl(water.fvec.Frame fr, water.fvec.Frame adaptFrm, java.lang.String destination_key, water.Job j, boolean computeMetrics, water.udf.CFuncRef customMetricFunc)
predictScoreImpl
in class hex.Model<GAMModel,GAMModel.GAMParameters,GAMModel.GAMModelOutput>
public double[] score0(double[] data, double[] preds)
score0
in class hex.Model<GAMModel,GAMModel.GAMParameters,GAMModel.GAMModelOutput>
public GAMMojoWriter getMojo()
getMojo
in class hex.Model<GAMModel,GAMModel.GAMParameters,GAMModel.GAMModelOutput>
protected water.Futures remove_impl(water.Futures fs, boolean cascade)
remove_impl
in class hex.Model<GAMModel,GAMModel.GAMParameters,GAMModel.GAMModelOutput>
protected water.AutoBuffer writeAll_impl(water.AutoBuffer ab)
writeAll_impl
in class hex.Model<GAMModel,GAMModel.GAMParameters,GAMModel.GAMModelOutput>
protected water.Keyed readAll_impl(water.AutoBuffer ab, water.Futures fs)
readAll_impl
in class hex.Model<GAMModel,GAMModel.GAMParameters,GAMModel.GAMModelOutput>