Class TrainingOptions

Options used in model training.

The maximum number of iterations in training. Used only for iterative training algorithms.
Type of loss function used during training run.
Learning rate in training. Used only for iterative training algorithms.
L1 regularization coefficient.
L2 regularization coefficient.
When early_stop is true, stops training when accuracy improvement is less than 'min_relative_progress'. Used only for iterative training algorithms.
Whether to train a model from the last checkpoint.
Whether to stop early when the loss doesn't improve significantly any more (compared to min_relative_progress). Used only for iterative training algorithms.
Name of input label columns in training data.
The data split type for training and evaluation, e.g. RANDOM.
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.
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:
The strategy to determine learn rate for the current iteration.
Specifies the initial learning rate for the line search learn rate strategy.
Weights associated with each label class, for rebalancing the training data. Only applicable for classification models.
User column specified for matrix factorization models.
Item column specified for matrix factorization models.
Distance type for clustering models.
Number of clusters for clustering models.
Google Cloud Storage URI from which the model was imported. Only applicable for imported models.
Optimization strategy for training linear regression models.
Hidden units for dnn models.
Batch size for dnn models.
Dropout probability for dnn models.
Maximum depth of a tree for boosted tree models.
Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models.
Minimum split loss for boosted tree models.
Num factors specified for matrix factorization models.
Feedback type that specifies which algorithm to run for matrix factorization.
Hyperparameter for matrix factoration when implicit feedback type is specified.
The method used to initialize the centroids for kmeans algorithm.
The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM.
Column to be designated as time series timestamp for ARIMA model.
Column to be designated as time series data for ARIMA model.
Whether to enable auto ARIMA or not.
A specification of the non-seasonal part of the ARIMA model: the three components (p, d, q) are the AR order, the degree of differencing, and the MA order.
The data frequency of a time series.
Include drift when fitting an ARIMA model.
The geographical region based on which the holidays are considered in time series modeling. If a valid value is specified, then holiday effects modeling is enabled.
The time series id column that was used during ARIMA model training.
The time series id columns that were used during ARIMA model training.
The number of periods ahead that need to be forecasted.
Whether to preserve the input structs in output feature names. Suppose there is a struct A with field b. When false (default), the output feature name is A_b. When true, the output feature name is A.b.
The max value of non-seasonal p and q.
If true, perform decompose time series and save the results.
If true, clean spikes and dips in the input time series.
If true, detect step changes and make data adjustment in the input time series.


builtins.object > proto.message.Message > TrainingOptions



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

API documentation for bigquery_v2.types.Model.TrainingRun.TrainingOptions.LabelClassWeightsEntry class.




Return True if any field is truthy, False otherwise.



Return True if this field was set to something non-zero on the wire.

In most cases, this method will return True when __getattr__ would return a truthy value and False when it would return a falsy value, so explicitly calling this is not useful.

The exception case is empty messages explicitly set on the wire, which are falsy from __getattr__. This method allows to distinguish between an explicitly provided empty message and the absence of that message, which is useful in some edge cases.

The most common edge case is the use of google.protobuf.BoolValue to get a boolean that distinguishes between False and None (or the same for a string, int, etc.). This library transparently handles that case for you, but this method remains available to accommodate cases not automatically covered.

key str

The name of the field.

boolWhether the field's value corresponds to a non-empty wire serialization.



Delete the value on the given field.

This is generally equivalent to setting a falsy value.



Return True if the messages are equal, False otherwise.



Retrieve the given field's value.

In protocol buffers, the presence of a field on a message is sufficient for it to always be "present".

For primitives, a value of the correct type will always be returned (the "falsy" values in protocol buffers consistently match those in Python). For repeated fields, the falsy value is always an empty sequence.

For messages, protocol buffers does distinguish between an empty message and absence, but this distinction is subtle and rarely relevant. Therefore, this method always returns an empty message (following the official implementation). To check for message presence, use key in self (in other words, __contains__).

.. note::

Some well-known protocol buffer types
(e.g. ``google.protobuf.Timestamp``) will be converted to
their Python equivalents. See the ``marshal`` module for
more details.



Return True if the messages are unequal, False otherwise.


__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.