public abstract class ModelingStep<M extends hex.Model> extends water.Iced<ModelingStep>
AutoML training steps.| Modifier and Type | Class and Description |
|---|---|
static class |
ModelingStep.DynamicStep<M extends hex.Model>
Step designed to dynamically choose to train a model or another, a grid or anything else,
based on the current automl workflow history.
|
static class |
ModelingStep.GridStep<M extends hex.Model>
Step designed to build multiple models using a (random) grid search.
|
static class |
ModelingStep.ModelStep<M extends hex.Model>
Step designed to build a single/default model.
|
protected static class |
ModelingStep.SeedPolicy |
static class |
ModelingStep.SelectionStep<M extends hex.Model>
Step designed to train some models (or not) and then deciding to make a selection
and add and/or remove models to/from the current leaderboard.
|
| Modifier and Type | Field and Description |
|---|---|
protected IAlgo |
_algo |
protected java.lang.String |
_description |
protected java.lang.String |
_id |
protected AutoML.Constraint[] |
_ignoredConstraints |
protected int |
_priorityGroup |
protected java.lang.String |
_provider |
protected int |
_weight |
protected WorkAllocations.Work |
_work |
| Modifier | Constructor and Description |
|---|---|
protected |
ModelingStep(java.lang.String provider,
IAlgo algo,
java.lang.String id,
int priorityGroup,
int weight,
AutoML autoML) |
| Modifier and Type | Method and Description |
|---|---|
protected AutoML |
aml() |
protected void |
applyPreprocessing(hex.Model.Parameters params) |
boolean |
canRun() |
boolean |
equals(java.lang.Object o) |
IAlgo |
getAlgo() |
protected WorkAllocations.Work |
getAllocatedWork() |
java.lang.String |
getGlobalId() |
java.lang.String |
getId() |
protected abstract WorkAllocations.JobType |
getJobType() |
protected PreprocessingConfig |
getPreprocessingConfig() |
int |
getPriorityGroup() |
java.lang.String |
getProvider()
Each provider (usually one class) defining a collection of steps must have a unique name.
|
protected java.util.Optional<? extends ModelingStep> |
getSubStep(java.lang.String id) |
protected hex.Model[] |
getTrainedModels() |
protected water.Key<hex.Model>[] |
getTrainedModelsKeys() |
int |
getWeight() |
protected WorkAllocations |
getWorkAllocations() |
int |
hashCode() |
boolean |
ignores(AutoML.Constraint constraint) |
protected void |
initTimeConstraints(hex.Model.Parameters parms,
double upperLimit) |
protected boolean |
isCVEnabled() |
boolean |
isResumable() |
java.util.Iterator<? extends ModelingStep> |
iterateSubSteps() |
boolean |
limitModelTrainingTime() |
protected water.Key |
makeKey(java.lang.String name,
boolean withCounter) |
protected WorkAllocations.Work |
makeWork()
Creates the
WorkAllocations.Work instance representing the total work handled by this step. |
protected void |
onDone(water.Job job) |
protected void |
register(water.Key key) |
water.Job |
run()
Execute this modeling step, returning the job associated to it if any.
|
protected void |
setClassBalancingParams(hex.Model.Parameters params) |
protected void |
setCommonModelBuilderParams(hex.Model.Parameters params)
Assign common parameters to the model params before building the model or set of models.
|
protected void |
setCrossValidationParams(hex.Model.Parameters params) |
protected void |
setCustomParams(hex.Model.Parameters params) |
protected void |
setDistributionParameters(hex.Model.Parameters parms) |
protected void |
setSeed(hex.Model.Parameters parms,
hex.Model.Parameters defaults,
ModelingStep.SeedPolicy seedPolicy) |
protected void |
setStoppingCriteria(hex.Model.Parameters parms,
hex.Model.Parameters defaults)
Configures early-stopping for the model or set of models to be built.
|
protected void |
setWeightingParams(hex.Model.Parameters params) |
protected abstract water.Job |
startJob()
Starts a new
Job as part of this step. |
protected <MP extends hex.Model.Parameters> |
startModel(water.Key<M> resultKey,
MP params) |
protected <MP extends hex.Model.Parameters> |
startSearch(water.Key<hex.grid.Grid> resultKey,
MP baseParams,
java.util.Map<java.lang.String,java.lang.Object[]> hyperParams,
hex.grid.HyperSpaceSearchCriteria searchCriteria) |
protected final IAlgo _algo
protected final java.lang.String _provider
protected final java.lang.String _id
protected int _weight
protected int _priorityGroup
protected AutoML.Constraint[] _ignoredConstraints
protected java.lang.String _description
protected WorkAllocations.Work _work
protected <MP extends hex.Model.Parameters> water.Job<hex.grid.Grid> startSearch(water.Key<hex.grid.Grid> resultKey,
MP baseParams,
java.util.Map<java.lang.String,java.lang.Object[]> hyperParams,
hex.grid.HyperSpaceSearchCriteria searchCriteria)
protected <MP extends hex.Model.Parameters> water.Job<M> startModel(water.Key<M> resultKey, MP params)
protected void setDistributionParameters(hex.Model.Parameters parms)
public java.lang.String getProvider()
public java.lang.String getId()
public java.lang.String getGlobalId()
public IAlgo getAlgo()
public int getWeight()
public int getPriorityGroup()
public boolean isResumable()
public boolean ignores(AutoML.Constraint constraint)
public boolean limitModelTrainingTime()
public boolean canRun()
run() on this modeling step to start a new job.public water.Job run()
public java.util.Iterator<? extends ModelingStep> iterateSubSteps()
Iterator for the potential sub-steps provided by this modeling step.protected java.util.Optional<? extends ModelingStep> getSubStep(java.lang.String id)
id - protected abstract WorkAllocations.JobType getJobType()
protected abstract water.Job startJob()
Job as part of this step.protected void onDone(water.Job job)
protected void register(water.Key key)
protected AutoML aml()
protected WorkAllocations.Work getAllocatedWork()
protected WorkAllocations.Work makeWork()
WorkAllocations.Work instance representing the total work handled by this step.protected water.Key makeKey(java.lang.String name,
boolean withCounter)
protected WorkAllocations getWorkAllocations()
protected hex.Model[] getTrainedModels()
protected water.Key<hex.Model>[] getTrainedModelsKeys()
protected boolean isCVEnabled()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectprotected void setCommonModelBuilderParams(hex.Model.Parameters params)
params - the model parameters to which the common parameters will be added.protected void setCrossValidationParams(hex.Model.Parameters params)
protected void setWeightingParams(hex.Model.Parameters params)
protected void setClassBalancingParams(hex.Model.Parameters params)
protected void setCustomParams(hex.Model.Parameters params)
protected void applyPreprocessing(hex.Model.Parameters params)
protected PreprocessingConfig getPreprocessingConfig()
protected void setStoppingCriteria(hex.Model.Parameters parms,
hex.Model.Parameters defaults)
parms - the model parameters to which the stopping criteria will be added.defaults - the default parameters for the corresponding ModelBuilder.protected void setSeed(hex.Model.Parameters parms,
hex.Model.Parameters defaults,
ModelingStep.SeedPolicy seedPolicy)
parms - the model parameters to which the stopping criteria will be added.defaults - the default parameters for the corresponding ModelBuilder.seedPolicy - the policy defining how the seed will be assigned to the model parameters.protected void initTimeConstraints(hex.Model.Parameters parms,
double upperLimit)