Class Hyperparameters
java.lang.Object
co.elastic.clients.elasticsearch.ml.Hyperparameters
- All Implemented Interfaces:
JsonpSerializable
- See Also:
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final JsonpDeserializer<Hyperparameters>
Json deserializer forHyperparameters
-
Method Summary
Modifier and TypeMethodDescriptionfinal Double
alpha()
Advanced configuration option.final Double
Advanced configuration option.final Double
eta()
Advanced configuration option.final Double
Advanced configuration option.final Double
Advanced configuration option.final Double
gamma()
Advanced configuration option.final Double
lambda()
Advanced configuration option.final Integer
If the algorithm fails to determine a non-trivial tree (more than a single leaf), this parameter determines how many of such consecutive failures are tolerated.final Integer
Advanced configuration option.final Integer
maxTrees()
Advanced configuration option.final Integer
numFolds()
The maximum number of folds for the cross-validation procedure.final Integer
Determines the maximum number of splits for every feature that can occur in a decision tree when the tree is trained.static Hyperparameters
void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
final Integer
Advanced configuration option.final Double
Advanced configuration option.toString()
-
Field Details
-
_DESERIALIZER
Json deserializer forHyperparameters
-
-
Method Details
-
of
public static Hyperparameters of(Function<Hyperparameters.Builder, ObjectBuilder<Hyperparameters>> fn) -
alpha
Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This parameter affects loss calculations by acting as a multiplier of the tree depth. Higher alpha values result in shallower trees and faster training times. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to zero.API name:
alpha
-
lambda
Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies an L2 regularization term which applies to leaf weights of the individual trees in the forest. A high lambda value causes training to favor small leaf weights. This behavior makes the prediction function smoother at the expense of potentially not being able to capture relevant relationships between the features and the dependent variable. A small lambda value results in large individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value.API name:
lambda
-
gamma
Advanced configuration option. Regularization parameter to prevent overfitting on the training data set. Multiplies a linear penalty associated with the size of individual trees in the forest. A high gamma value causes training to prefer small trees. A small gamma value results in larger individual trees and slower training. By default, this value is calculated during hyperparameter optimization. It must be a nonnegative value.API name:
gamma
-
eta
Advanced configuration option. The shrinkage applied to the weights. Smaller values result in larger forests which have a better generalization error. However, larger forests cause slower training. By default, this value is calculated during hyperparameter optimization. It must be a value between0.001
and1
.API name:
eta
-
etaGrowthRatePerTree
Advanced configuration option. Specifies the rate at whicheta
increases for each new tree that is added to the forest. For example, a rate of 1.05 increaseseta
by 5% for each extra tree. By default, this value is calculated during hyperparameter optimization. It must be between0.5
and2
.API name:
eta_growth_rate_per_tree
-
featureBagFraction
Advanced configuration option. Defines the fraction of features that will be used when selecting a random bag for each candidate split. By default, this value is calculated during hyperparameter optimization.API name:
feature_bag_fraction
-
downsampleFactor
Advanced configuration option. Controls the fraction of data that is used to compute the derivatives of the loss function for tree training. A small value results in the use of a small fraction of the data. If this value is set to be less than 1, accuracy typically improves. However, too small a value may result in poor convergence for the ensemble and so require more trees. By default, this value is calculated during hyperparameter optimization. It must be greater than zero and less than or equal to 1.API name:
downsample_factor
-
maxAttemptsToAddTree
If the algorithm fails to determine a non-trivial tree (more than a single leaf), this parameter determines how many of such consecutive failures are tolerated. Once the number of attempts exceeds the threshold, the forest training stops.API name:
max_attempts_to_add_tree
-
maxOptimizationRoundsPerHyperparameter
Advanced configuration option. A multiplier responsible for determining the maximum number of hyperparameter optimization steps in the Bayesian optimization procedure. The maximum number of steps is determined based on the number of undefined hyperparameters times the maximum optimization rounds per hyperparameter. By default, this value is calculated during hyperparameter optimization.API name:
max_optimization_rounds_per_hyperparameter
-
maxTrees
Advanced configuration option. Defines the maximum number of decision trees in the forest. The maximum value is 2000. By default, this value is calculated during hyperparameter optimization.API name:
max_trees
-
numFolds
The maximum number of folds for the cross-validation procedure.API name:
num_folds
-
numSplitsPerFeature
Determines the maximum number of splits for every feature that can occur in a decision tree when the tree is trained.API name:
num_splits_per_feature
-
softTreeDepthLimit
Advanced configuration option. Machine learning uses loss guided tree growing, which means that the decision trees grow where the regularized loss decreases most quickly. This soft limit combines with thesoft_tree_depth_tolerance
to penalize trees that exceed the specified depth; the regularized loss increases quickly beyond this depth. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0.API name:
soft_tree_depth_limit
-
softTreeDepthTolerance
Advanced configuration option. This option controls how quickly the regularized loss increases when the tree depth exceedssoft_tree_depth_limit
. By default, this value is calculated during hyperparameter optimization. It must be greater than or equal to 0.01.API name:
soft_tree_depth_tolerance
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupHyperparametersDeserializer
protected static void setupHyperparametersDeserializer(ObjectDeserializer<Hyperparameters.Builder> op)
-