Class TrainingOptions (2.1.0)

TrainingOptions(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Attributes

NameDescription
max_iterations int
The maximum number of iterations in training. Used only for iterative training algorithms.
loss_type `.gcb_model.Model.LossType`
Type of loss function used during training run.
learn_rate float
Learning rate in training. Used only for iterative training algorithms.
l1_regularization `.wrappers.DoubleValue`
L1 regularization coefficient.
l2_regularization `.wrappers.DoubleValue`
L2 regularization coefficient.
min_relative_progress `.wrappers.DoubleValue`
When early_stop is true, stops training when accuracy improvement is less than 'min_relative_progress'. Used only for iterative training algorithms.
warm_start `.wrappers.BoolValue`
Whether to train a model from the last checkpoint.
early_stop `.wrappers.BoolValue`
Whether to stop early when the loss doesn't improve significantly any more (compared to min_relative_progress). Used only for iterative training algorithms.
input_label_columns Sequence[str]
Name of input label columns in training data.
data_split_method `.gcb_model.Model.DataSplitMethod`
The data split type for training and evaluation, e.g. RANDOM.
data_split_eval_fraction float
The fraction of evaluation data over the whole input data. The rest of data will be used as training data. The format should be double. Accurate to two decimal places. Default value is 0.2.
data_split_column str
The column to split data with. This column won't be used as a feature. 1. When data_split_method is CUSTOM, the corresponding column should be boolean. The rows with true value tag are eval data, and the false are training data. 2. When data_split_method is SEQ, the first DATA_SPLIT_EVAL_FRACTION rows (from smallest to largest) in the corresponding column are used as training data, and the rest are eval data. It respects the order in Orderable data types: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data-type-properties
learn_rate_strategy `.gcb_model.Model.LearnRateStrategy`
The strategy to determine learn rate for the current iteration.
initial_learn_rate float
Specifies the initial learning rate for the line search learn rate strategy.
label_class_weights Sequence[`.gcb_model.Model.TrainingRun.TrainingOptions.LabelClassWeightsEntry`]
Weights associated with each label class, for rebalancing the training data. Only applicable for classification models.
distance_type `.gcb_model.Model.DistanceType`
Distance type for clustering models.
num_clusters int
Number of clusters for clustering models.
model_uri str
[Beta] Google Cloud Storage URI from which the model was imported. Only applicable for imported models.
optimization_strategy `.gcb_model.Model.OptimizationStrategy`
Optimization strategy for training linear regression models.
kmeans_initialization_method `.gcb_model.Model.KmeansEnums.KmeansInitializationMethod`
The method used to initialize the centroids for kmeans algorithm.
kmeans_initialization_column str
The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM.

Inheritance

builtins.object > proto.message.Message > TrainingOptions

Classes

LabelClassWeightsEntry

LabelClassWeightsEntry(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The abstract base class for a message.

Parameters
NameDescription
kwargs dict

Keys and values corresponding to the fields of the message.

mapping Union[dict, `.Message`]

A dictionary or message to be used to determine the values for this message.

ignore_unknown_fields Optional(bool)

If True, do not raise errors for unknown fields. Only applied if mapping is a mapping type or there are keyword parameters.

Methods

__delattr__

__delattr__(key)

Delete the value on the given field.

This is generally equivalent to setting a falsy value.

__eq__

__eq__(other)

Return True if the messages are equal, False otherwise.

__ne__

__ne__(other)

Return True if the messages are unequal, False otherwise.

__setattr__

__setattr__(key, value)

Set the value on the given field.

For well-known protocol buffer types which are marshalled, either the protocol buffer object or the Python equivalent is accepted.