public class ModelSelection extends hex.ModelBuilder<ModelSelectionModel,ModelSelectionModel.ModelSelectionParameters,ModelSelectionModel.ModelSelectionModelOutput>
| Modifier and Type | Class and Description |
|---|---|
class |
ModelSelection.ModelSelectionDriver |
| Modifier and Type | Field and Description |
|---|---|
java.lang.String[][] |
_bestModelPredictors |
double[] |
_bestR2Values |
int |
_glmNFolds |
int |
_numPredictors |
java.lang.String[] |
_predictorNames |
_coordinator, _desc, _eventPublisher, _fold, _input_parms, _job, _messages, _nclass, _offset, _orig_projection_array, _origDomains, _origNames, _origTrain, _parms, _priorClassDist, _removedCols, _response, _result, _startUpOnceModelBuilder, _train, _treatment, _valid, _vresponse, _weights| Constructor and Description |
|---|
ModelSelection(boolean startup_once) |
ModelSelection(ModelSelectionModel.ModelSelectionParameters parms) |
ModelSelection(ModelSelectionModel.ModelSelectionParameters parms,
water.Key<ModelSelectionModel> key) |
| Modifier and Type | Method and Description |
|---|---|
static GLMModel |
buildExtractBestR2Model(water.fvec.Frame[] trainingFrames,
ModelSelectionModel.ModelSelectionParameters parms,
int glmNFolds,
java.lang.String foldColumn,
hex.Model.Parameters.FoldAssignmentScheme foldAssignment)
Given the training Frame array, build models for each training frame and return the GLMModel with the best
R2 values.
|
hex.ModelCategory[] |
can_build() |
static GLMModel |
forwardStep(java.util.List<java.lang.Integer> currSubsetIndices,
java.util.List<java.lang.String> coefNames,
int predPos,
java.util.List<java.lang.Integer> validSubsets,
ModelSelectionModel.ModelSelectionParameters parms,
java.lang.String foldColumn,
int glmNFolds,
hex.Model.Parameters.FoldAssignmentScheme foldAssignment)
Given a predictor subset with indices stored in currSubsetIndices, one more predictor from the coefNames
that was not found in currSubsetIndices was added to the subset to form a new Training frame.
|
boolean |
haveMojo() |
boolean |
havePojo() |
void |
init(boolean expensive) |
boolean |
isSupervised() |
protected int |
nModelsInParallel(int folds) |
static GLMModel |
replacement(java.util.List<java.lang.Integer> currSubsetIndices,
java.util.List<java.lang.String> coefNames,
double bestR2,
ModelSelectionModel.ModelSelectionParameters parms,
int glmNFolds,
java.lang.String foldColumn,
java.util.List<java.lang.Integer> validSubset,
hex.Model.Parameters.FoldAssignmentScheme foldAssignment)
consider the predictors in subset as pred0, pred1, pred2 (using subset size 3 as example):
a.
|
protected ModelSelection.ModelSelectionDriver |
trainModelImpl() |
algoName, algos, builderVisibility, canLearnFromNAs, checkDistributions, checkEarlyStoppingReproducibility, checkMemoryFootPrint_impl, checkMemoryFootPrint, checkResponseVariable, clearInitState, clearValidationErrors, computeCrossValidation, computePriorClassDistribution, cv_buildModels, cv_canBuildMainModelInParallel, cv_computeAndSetOptimalParameters, cv_initStoppingParameters, cv_mainModelScores, cv_makeAggregateModelMetircs, cv_scoreCVModels, cv_updateOptimalParameters, defaultKey, desiredChunks, dest, error_count, error, get, getName, getSysProperty, getToEigenVec, hasFoldCol, hasOffsetCol, hasTreatmentCol, hasWeightCol, hide, ignoreBadColumns, ignoreConstColumns, ignoreInvalidColumns, ignoreStringColumns, ignoreUuidColumns, info, init_adaptFrameToTrain, init_getNClass, initWorkspace, isClassifier, isResponseOptional, isStopped, javaName, logMe, make, make, make, makeCVModelBuilder, makePojoWriter, message, nclasses, nFoldCV, nFoldWork, nModelsInParallel, nModelsInParallel, numSpecialCols, paramName, rebalance, remainingTimeSecs, response, schemaDirectory, separateFeatureVecs, setTrain, setValid, shouldReorder, stop_requested, timeout, train, trainModel, trainModel, trainModelNested, trainModelNested, trainModelOnH2ONode, valid, validateStoppingMetric, validationErrors, validationWarnings, vresponse, warnpublic java.lang.String[][] _bestModelPredictors
public double[] _bestR2Values
public int _numPredictors
public java.lang.String[] _predictorNames
public int _glmNFolds
public ModelSelection(boolean startup_once)
public ModelSelection(ModelSelectionModel.ModelSelectionParameters parms)
public ModelSelection(ModelSelectionModel.ModelSelectionParameters parms, water.Key<ModelSelectionModel> key)
protected int nModelsInParallel(int folds)
nModelsInParallel in class hex.ModelBuilder<ModelSelectionModel,ModelSelectionModel.ModelSelectionParameters,ModelSelectionModel.ModelSelectionModelOutput>protected ModelSelection.ModelSelectionDriver trainModelImpl()
trainModelImpl in class hex.ModelBuilder<ModelSelectionModel,ModelSelectionModel.ModelSelectionParameters,ModelSelectionModel.ModelSelectionModelOutput>public hex.ModelCategory[] can_build()
can_build in class hex.ModelBuilder<ModelSelectionModel,ModelSelectionModel.ModelSelectionParameters,ModelSelectionModel.ModelSelectionModelOutput>public boolean isSupervised()
isSupervised in class hex.ModelBuilder<ModelSelectionModel,ModelSelectionModel.ModelSelectionParameters,ModelSelectionModel.ModelSelectionModelOutput>public boolean haveMojo()
haveMojo in class hex.ModelBuilder<ModelSelectionModel,ModelSelectionModel.ModelSelectionParameters,ModelSelectionModel.ModelSelectionModelOutput>public boolean havePojo()
havePojo in class hex.ModelBuilder<ModelSelectionModel,ModelSelectionModel.ModelSelectionParameters,ModelSelectionModel.ModelSelectionModelOutput>public void init(boolean expensive)
init in class hex.ModelBuilder<ModelSelectionModel,ModelSelectionModel.ModelSelectionParameters,ModelSelectionModel.ModelSelectionModelOutput>public static GLMModel buildExtractBestR2Model(water.fvec.Frame[] trainingFrames, ModelSelectionModel.ModelSelectionParameters parms, int glmNFolds, java.lang.String foldColumn, hex.Model.Parameters.FoldAssignmentScheme foldAssignment)
trainingFrames - public static GLMModel forwardStep(java.util.List<java.lang.Integer> currSubsetIndices, java.util.List<java.lang.String> coefNames, int predPos, java.util.List<java.lang.Integer> validSubsets, ModelSelectionModel.ModelSelectionParameters parms, java.lang.String foldColumn, int glmNFolds, hex.Model.Parameters.FoldAssignmentScheme foldAssignment)
currSubsetIndices: - stored predictors that are chosen in the subsetcoefNames: - predictor names of full training framepredPos: - index/location of predictor to be added into currSubsetIndicespublic static GLMModel replacement(java.util.List<java.lang.Integer> currSubsetIndices, java.util.List<java.lang.String> coefNames, double bestR2, ModelSelectionModel.ModelSelectionParameters parms, int glmNFolds, java.lang.String foldColumn, java.util.List<java.lang.Integer> validSubset, hex.Model.Parameters.FoldAssignmentScheme foldAssignment)