Class TrainingOptions (2.5.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.
user_column str
User column specified for matrix factorization models.
item_column str
Item column specified for matrix factorization 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.
hidden_units Sequence[int]
Hidden units for dnn models.
batch_size int
Batch size for dnn models.
dropout `.wrappers.DoubleValue`
Dropout probability for dnn models.
max_tree_depth int
Maximum depth of a tree for boosted tree models.
subsample float
Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models.
min_split_loss `.wrappers.DoubleValue`
Minimum split loss for boosted tree models.
num_factors int
Num factors specified for matrix factorization models.
feedback_type `.gcb_model.Model.FeedbackType`
Feedback type that specifies which algorithm to run for matrix factorization.
wals_alpha `.wrappers.DoubleValue`
Hyperparameter for matrix factoration when implicit feedback type is specified.
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.
time_series_timestamp_column str
Column to be designated as time series timestamp for ARIMA model.
time_series_data_column str
Column to be designated as time series data for ARIMA model.
auto_arima bool
Whether to enable auto ARIMA or not.
non_seasonal_order `.gcb_model.Model.ArimaOrder`
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.
data_frequency `.gcb_model.Model.DataFrequency`
The data frequency of a time series.
include_drift bool
Include drift when fitting an ARIMA model.
holiday_region `.gcb_model.Model.HolidayRegion`
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.
time_series_id_column str
The id column that will be used to indicate different time series to forecast in parallel.
horizon int
The number of periods ahead that need to be forecasted.
preserve_input_structs bool
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.
auto_arima_max_order int
The max value of non-seasonal p and q.

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.