public abstract static class Model.Parameters extends Iced<Model.Parameters> implements Model.AdaptFrameParameters
The non-transient fields are input parameters to the model-building process, and are considered "first class citizens" by the front-end - the front-end will cache Parameters (in the browser, in JavaScript, on disk) and rebuild Parameter instances from those caches. WARNING: Model Parameters is not immutable object and ModelBuilder can modify them!
Modifier and Type | Class and Description |
---|---|
static class |
Model.Parameters.CategoricalEncodingScheme |
static class |
Model.Parameters.FoldAssignmentScheme |
Modifier and Type | Field and Description |
---|---|
MultinomialAucType |
_auc_type |
boolean |
_auto_rebalance |
int |
_auuc_nbins
Bins for calculating AUUC, if applicable.
|
AUUC.AUUCType |
_auuc_type
Type to calculate default AUUC value.Ignored for non uplift models.
|
boolean |
_balance_classes
Should all classes be over/under-sampled to balance the class
distribution?
|
Model.Parameters.CategoricalEncodingScheme |
_categorical_encoding |
boolean |
_check_constant_response |
Key<? extends Model> |
_checkpoint
A model key associated with a previously trained Deep Learning
model.
|
float[] |
_class_sampling_factors
Desired over/under-sampling ratios per class (lexicographic order).
|
java.lang.String |
_custom_distribution_func
Reference to custom distribution function.
|
java.lang.String |
_custom_metric_func
Reference to custom metric function.
|
int |
_cv_fold |
hex.genmodel.utils.DistributionFamily |
_distribution |
java.lang.String |
_export_checkpoints_dir
Directory where generated models will be exported
|
Model.Parameters.FoldAssignmentScheme |
_fold_assignment |
java.lang.String |
_fold_column |
int |
_gainslift_bins
Bins for Gains/Lift table, if applicable.
|
double |
_huber_alpha |
boolean |
_ignore_const_cols |
java.lang.String[] |
_ignored_columns |
boolean |
_is_cv_model |
boolean |
_keep_cross_validation_fold_assignment |
boolean |
_keep_cross_validation_models |
boolean |
_keep_cross_validation_predictions |
int |
_keep_cross_validation_predictions_precision
What precision to use for storing holdout predictions (the number of decimal places stored)?
Special values:
-1 == AUTO; use precision=8 for classification, precision=unlimited for everything else
0; disabled
for classification problems consider eg.:
4 to keep only first 4 decimal places (consumes 75% less memory)
or 8 to keep 8 decimal places (consumes 50% less memory)
|
double |
_main_model_time_budget_factor
Using _main_model_time_budget_factor to determine if and how we should restrict the time for the main model.
|
float |
_max_after_balance_size
When classes are being balanced, limit the resulting dataset size to
the specified multiple of the original dataset size.
|
int |
_max_categorical_levels |
int |
_max_confusion_matrix_size
For classification models, the maximum size (in terms of classes) of
the confusion matrix for it to be printed.
|
double |
_max_runtime_secs
Maximum allowed runtime in seconds for model training.
|
int |
_nfolds |
java.lang.String |
_offset_column |
boolean |
_parallelize_cross_validation |
Key<ModelPreprocessor>[] |
_preprocessors |
Key<? extends Model> |
_pretrained_autoencoder
A pretrained Autoencoder DL model with matching inputs and hidden layers
can be used to initialize the weights and biases (excluding the output layer).
|
double |
_quantile_alpha |
java.lang.String |
_response_column
Supervised models have an expected response they get to train with!
|
boolean |
_score_each_iteration |
long |
_seed |
ScoreKeeper.StoppingMetric |
_stopping_metric
Metric to use for convergence checking, only for _stopping_rounds > 0.
|
int |
_stopping_rounds
Early stopping based on convergence of stopping_metric.
|
double |
_stopping_tolerance
Relative tolerance for metric-based stopping criterion: stop if relative improvement is not at least this much.
|
Key<Frame> |
_train |
java.lang.String |
_treatment_column |
double |
_tweedie_power |
Key<Frame> |
_valid |
java.lang.String |
_weights_column |
static int |
MAX_SUPPORTED_LEVELS
Maximal number of supported levels in response.
|
Constructor and Description |
---|
Parameters() |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.String |
algoName()
The short name, used in making Keys.
|
long |
checksum() |
long |
checksum(java.util.Set<java.lang.String> ignoredFields)
Compute a checksum based on all non-transient non-static ice-able assignable fields (incl.
|
protected boolean |
defaultDropConsCols() |
protected double |
defaultStoppingTolerance()
Default relative tolerance for convergence-based early stopping
|
abstract java.lang.String |
fullName()
The pretty algo name for this Model (e.g., Gradient Boosting Machine, rather than GBM).
|
Model.Parameters.CategoricalEncodingScheme |
getCategoricalEncoding() |
java.util.Set<Key<?>> |
getDependentKeys() |
hex.genmodel.utils.DistributionFamily |
getDistributionFamily() |
java.lang.String |
getFoldColumn() |
int |
getMaxCategoricalLevels() |
java.lang.String[] |
getNonPredictors() |
java.lang.String |
getOffsetColumn() |
long |
getOrMakeRealSeed() |
java.lang.String |
getResponseColumn() |
java.lang.String |
getTreatmentColumn() |
java.util.Set<java.lang.String> |
getUsedColumns(java.lang.String[] trainNames)
Looks for all String parameters with the word 'column' in the parameter name, if
the parameter value is present in supplied array of strings, it will be added to the
returned set of used columns.
|
java.lang.String |
getWeightsColumn() |
boolean |
hasCheckpoint() |
abstract java.lang.String |
javaName()
The Java class name for this Model (e.g., hex.tree.gbm.GBM, rather than GBM).
|
double |
missingColumnsType()
Type of missing columns during adaptation between train/test datasets
Overload this method for models that have sparse data handling - a zero
will preserve the sparseness.
|
abstract long |
progressUnits()
How much work will be done for this model?
|
void |
read_lock_frames(Job job)
Read-Lock both training and validation User frames.
|
void |
read_unlock_frames(Job job)
Read-UnLock both training and validation User frames.
|
void |
setDistributionFamily(hex.genmodel.utils.DistributionFamily distributionFamily) |
void |
setTrain(Key<Frame> train) |
Frame |
train() |
Frame |
valid() |
asBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonBytes, toJsonString, write, writeExternal, writeJSON
public static final int MAX_SUPPORTED_LEVELS
public int _nfolds
public boolean _keep_cross_validation_models
public boolean _keep_cross_validation_predictions
public int _keep_cross_validation_predictions_precision
public boolean _keep_cross_validation_fold_assignment
public boolean _parallelize_cross_validation
public boolean _auto_rebalance
public Key<ModelPreprocessor>[] _preprocessors
public long _seed
public Model.Parameters.FoldAssignmentScheme _fold_assignment
public Model.Parameters.CategoricalEncodingScheme _categorical_encoding
public int _max_categorical_levels
public hex.genmodel.utils.DistributionFamily _distribution
public double _tweedie_power
public double _quantile_alpha
public double _huber_alpha
public java.lang.String[] _ignored_columns
public boolean _ignore_const_cols
public java.lang.String _weights_column
public java.lang.String _offset_column
public java.lang.String _fold_column
public java.lang.String _treatment_column
public boolean _check_constant_response
public boolean _is_cv_model
public int _cv_fold
public boolean _score_each_iteration
public double _max_runtime_secs
public double _main_model_time_budget_factor
ModelBuilder.setMaxRuntimeSecsForMainModel()
.public int _stopping_rounds
public ScoreKeeper.StoppingMetric _stopping_metric
public double _stopping_tolerance
public java.lang.String _response_column
public boolean _balance_classes
public float _max_after_balance_size
public float[] _class_sampling_factors
public int _max_confusion_matrix_size
public Key<? extends Model> _checkpoint
public Key<? extends Model> _pretrained_autoencoder
public java.lang.String _custom_metric_func
public java.lang.String _custom_distribution_func
public java.lang.String _export_checkpoints_dir
public int _gainslift_bins
public MultinomialAucType _auc_type
public AUUC.AUUCType _auuc_type
public int _auuc_nbins
public abstract java.lang.String algoName()
public abstract java.lang.String fullName()
public abstract java.lang.String javaName()
protected double defaultStoppingTolerance()
public abstract long progressUnits()
public long getOrMakeRealSeed()
public final Frame train()
public final Frame valid()
public java.lang.String[] getNonPredictors()
getNonPredictors
in interface Model.AdaptFrameParameters
public void read_lock_frames(Job job)
public void read_unlock_frames(Job job)
protected boolean defaultDropConsCols()
public double missingColumnsType()
missingColumnsType
in interface Model.AdaptFrameParameters
public boolean hasCheckpoint()
public long checksum()
public long checksum(java.util.Set<java.lang.String> ignoredFields)
ignoredFields
- A Set
of fields to ignore. Can be empty or null.Model.Parameters
objectpublic java.util.Set<java.lang.String> getUsedColumns(java.lang.String[] trainNames)
trainNames
- names of columns in the training framepublic java.util.Set<Key<?>> getDependentKeys()
public final Model.Parameters.CategoricalEncodingScheme getCategoricalEncoding()
getCategoricalEncoding
in interface Model.AdaptFrameParameters
public final java.lang.String getWeightsColumn()
getWeightsColumn
in interface Model.AdaptFrameParameters
public final java.lang.String getOffsetColumn()
getOffsetColumn
in interface Model.AdaptFrameParameters
public final java.lang.String getFoldColumn()
getFoldColumn
in interface Model.AdaptFrameParameters
public final java.lang.String getResponseColumn()
getResponseColumn
in interface Model.AdaptFrameParameters
public final java.lang.String getTreatmentColumn()
getTreatmentColumn
in interface Model.AdaptFrameParameters
public final int getMaxCategoricalLevels()
getMaxCategoricalLevels
in interface Model.AdaptFrameParameters
public void setDistributionFamily(hex.genmodel.utils.DistributionFamily distributionFamily)
public hex.genmodel.utils.DistributionFamily getDistributionFamily()