pub struct TrainingOptions {
Show 86 fields pub max_iterations: i64, pub loss_type: i32, pub learn_rate: f64, pub l1_regularization: Option<f64>, pub l2_regularization: Option<f64>, pub min_relative_progress: Option<f64>, pub warm_start: Option<bool>, pub early_stop: Option<bool>, pub input_label_columns: Vec<String>, pub data_split_method: i32, pub data_split_eval_fraction: f64, pub data_split_column: String, pub learn_rate_strategy: i32, pub initial_learn_rate: f64, pub label_class_weights: BTreeMap<String, f64>, pub user_column: String, pub item_column: String, pub distance_type: i32, pub num_clusters: i64, pub model_uri: String, pub optimization_strategy: i32, pub hidden_units: Vec<i64>, pub batch_size: i64, pub dropout: Option<f64>, pub max_tree_depth: i64, pub subsample: f64, pub min_split_loss: Option<f64>, pub booster_type: i32, pub num_parallel_tree: Option<i64>, pub dart_normalize_type: i32, pub tree_method: i32, pub min_tree_child_weight: Option<i64>, pub colsample_bytree: Option<f64>, pub colsample_bylevel: Option<f64>, pub colsample_bynode: Option<f64>, pub num_factors: i64, pub feedback_type: i32, pub wals_alpha: Option<f64>, pub kmeans_initialization_method: i32, pub kmeans_initialization_column: String, pub time_series_timestamp_column: String, pub time_series_data_column: String, pub auto_arima: Option<bool>, pub non_seasonal_order: Option<ArimaOrder>, pub data_frequency: i32, pub calculate_p_values: Option<bool>, pub include_drift: Option<bool>, pub holiday_region: i32, pub holiday_regions: Vec<i32>, pub time_series_id_column: String, pub time_series_id_columns: Vec<String>, pub horizon: i64, pub auto_arima_max_order: i64, pub auto_arima_min_order: i64, pub num_trials: i64, pub max_parallel_trials: i64, pub hparam_tuning_objectives: Vec<i32>, pub decompose_time_series: Option<bool>, pub clean_spikes_and_dips: Option<bool>, pub adjust_step_changes: Option<bool>, pub enable_global_explain: Option<bool>, pub sampled_shapley_num_paths: i64, pub integrated_gradients_num_steps: i64, pub category_encoding_method: i32, pub tf_version: String, pub color_space: i32, pub instance_weight_column: String, pub trend_smoothing_window_size: i64, pub time_series_length_fraction: f64, pub min_time_series_length: i64, pub max_time_series_length: i64, pub xgboost_version: String, pub approx_global_feature_contrib: Option<bool>, pub fit_intercept: Option<bool>, pub num_principal_components: i64, pub pca_explained_variance_ratio: f64, pub scale_features: Option<bool>, pub pca_solver: i32, pub auto_class_weights: Option<bool>, pub activation_fn: String, pub optimizer: String, pub budget_hours: f64, pub standardize_features: Option<bool>, pub l1_reg_activation: f64, pub model_registry: i32, pub vertex_ai_model_version_aliases: Vec<String>,
}
Expand description

Options used in model training.

Fields§

§max_iterations: i64

The maximum number of iterations in training. Used only for iterative training algorithms.

§loss_type: i32

Type of loss function used during training run.

§learn_rate: f64

Learning rate in training. Used only for iterative training algorithms.

§l1_regularization: Option<f64>

L1 regularization coefficient.

§l2_regularization: Option<f64>

L2 regularization coefficient.

§min_relative_progress: Option<f64>

When early_stop is true, stops training when accuracy improvement is less than ‘min_relative_progress’. Used only for iterative training algorithms.

§warm_start: Option<bool>

Whether to train a model from the last checkpoint.

§early_stop: Option<bool>

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: Vec<String>

Name of input label columns in training data.

§data_split_method: i32

The data split type for training and evaluation, e.g. RANDOM.

§data_split_eval_fraction: f64

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: String

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: i32

The strategy to determine learn rate for the current iteration.

§initial_learn_rate: f64

Specifies the initial learning rate for the line search learn rate strategy.

§label_class_weights: BTreeMap<String, f64>

Weights associated with each label class, for rebalancing the training data. Only applicable for classification models.

§user_column: String

User column specified for matrix factorization models.

§item_column: String

Item column specified for matrix factorization models.

§distance_type: i32

Distance type for clustering models.

§num_clusters: i64

Number of clusters for clustering models.

§model_uri: String

Google Cloud Storage URI from which the model was imported. Only applicable for imported models.

§optimization_strategy: i32

Optimization strategy for training linear regression models.

§hidden_units: Vec<i64>

Hidden units for dnn models.

§batch_size: i64

Batch size for dnn models.

§dropout: Option<f64>

Dropout probability for dnn models.

§max_tree_depth: i64

Maximum depth of a tree for boosted tree models.

§subsample: f64

Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models.

§min_split_loss: Option<f64>

Minimum split loss for boosted tree models.

§booster_type: i32

Booster type for boosted tree models.

§num_parallel_tree: Option<i64>

Number of parallel trees constructed during each iteration for boosted tree models.

§dart_normalize_type: i32

Type of normalization algorithm for boosted tree models using dart booster.

§tree_method: i32

Tree construction algorithm for boosted tree models.

§min_tree_child_weight: Option<i64>

Minimum sum of instance weight needed in a child for boosted tree models.

§colsample_bytree: Option<f64>

Subsample ratio of columns when constructing each tree for boosted tree models.

§colsample_bylevel: Option<f64>

Subsample ratio of columns for each level for boosted tree models.

§colsample_bynode: Option<f64>

Subsample ratio of columns for each node(split) for boosted tree models.

§num_factors: i64

Num factors specified for matrix factorization models.

§feedback_type: i32

Feedback type that specifies which algorithm to run for matrix factorization.

§wals_alpha: Option<f64>

Hyperparameter for matrix factoration when implicit feedback type is specified.

§kmeans_initialization_method: i32

The method used to initialize the centroids for kmeans algorithm.

§kmeans_initialization_column: String

The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM.

§time_series_timestamp_column: String

Column to be designated as time series timestamp for ARIMA model.

§time_series_data_column: String

Column to be designated as time series data for ARIMA model.

§auto_arima: Option<bool>

Whether to enable auto ARIMA or not.

§non_seasonal_order: Option<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: i32

The data frequency of a time series.

§calculate_p_values: Option<bool>

Whether or not p-value test should be computed for this model. Only available for linear and logistic regression models.

§include_drift: Option<bool>

Include drift when fitting an ARIMA model.

§holiday_region: i32

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.

§holiday_regions: Vec<i32>

A list of geographical regions that are used for time series modeling.

§time_series_id_column: String

The time series id column that was used during ARIMA model training.

§time_series_id_columns: Vec<String>

The time series id columns that were used during ARIMA model training.

§horizon: i64

The number of periods ahead that need to be forecasted.

§auto_arima_max_order: i64

The max value of the sum of non-seasonal p and q.

§auto_arima_min_order: i64

The min value of the sum of non-seasonal p and q.

§num_trials: i64

Number of trials to run this hyperparameter tuning job.

§max_parallel_trials: i64

Maximum number of trials to run in parallel.

§hparam_tuning_objectives: Vec<i32>

The target evaluation metrics to optimize the hyperparameters for.

§decompose_time_series: Option<bool>

If true, perform decompose time series and save the results.

§clean_spikes_and_dips: Option<bool>

If true, clean spikes and dips in the input time series.

§adjust_step_changes: Option<bool>

If true, detect step changes and make data adjustment in the input time series.

§enable_global_explain: Option<bool>

If true, enable global explanation during training.

§sampled_shapley_num_paths: i64

Number of paths for the sampled Shapley explain method.

§integrated_gradients_num_steps: i64

Number of integral steps for the integrated gradients explain method.

§category_encoding_method: i32

Categorical feature encoding method.

§tf_version: String

Based on the selected TF version, the corresponding docker image is used to train external models.

§color_space: i32

Enums for color space, used for processing images in Object Table. See more details at https://www.tensorflow.org/io/tutorials/colorspace.

§instance_weight_column: String

Name of the instance weight column for training data. This column isn’t be used as a feature.

§trend_smoothing_window_size: i64

Smoothing window size for the trend component. When a positive value is specified, a center moving average smoothing is applied on the history trend. When the smoothing window is out of the boundary at the beginning or the end of the trend, the first element or the last element is padded to fill the smoothing window before the average is applied.

§time_series_length_fraction: f64

The fraction of the interpolated length of the time series that’s used to model the time series trend component. All of the time points of the time series are used to model the non-trend component. This training option accelerates modeling training without sacrificing much forecasting accuracy. You can use this option with minTimeSeriesLength but not with maxTimeSeriesLength.

§min_time_series_length: i64

The minimum number of time points in a time series that are used in modeling the trend component of the time series. If you use this option you must also set the timeSeriesLengthFraction option. This training option ensures that enough time points are available when you use timeSeriesLengthFraction in trend modeling. This is particularly important when forecasting multiple time series in a single query using timeSeriesIdColumn. If the total number of time points is less than the minTimeSeriesLength value, then the query uses all available time points.

§max_time_series_length: i64

The maximum number of time points in a time series that can be used in modeling the trend component of the time series. Don’t use this option with the timeSeriesLengthFraction or minTimeSeriesLength options.

§xgboost_version: String

User-selected XGBoost versions for training of XGBoost models.

§approx_global_feature_contrib: Option<bool>

Whether to use approximate feature contribution method in XGBoost model explanation for global explain.

§fit_intercept: Option<bool>

Whether the model should include intercept during model training.

§num_principal_components: i64

Number of principal components to keep in the PCA model. Must be <= the number of features.

§pca_explained_variance_ratio: f64

The minimum ratio of cumulative explained variance that needs to be given by the PCA model.

§scale_features: Option<bool>

If true, scale the feature values by dividing the feature standard deviation. Currently only apply to PCA.

§pca_solver: i32

The solver for PCA.

§auto_class_weights: Option<bool>

Whether to calculate class weights automatically based on the popularity of each label.

§activation_fn: String

Activation function of the neural nets.

§optimizer: String

Optimizer used for training the neural nets.

§budget_hours: f64

Budget in hours for AutoML training.

§standardize_features: Option<bool>

Whether to standardize numerical features. Default to true.

§l1_reg_activation: f64

L1 regularization coefficient to activations.

§model_registry: i32

The model registry.

§vertex_ai_model_version_aliases: Vec<String>

The version aliases to apply in Vertex AI model registry. Always overwrite if the version aliases exists in a existing model.

Implementations§

source§

impl TrainingOptions

source

pub fn loss_type(&self) -> LossType

Returns the enum value of loss_type, or the default if the field is set to an invalid enum value.

source

pub fn set_loss_type(&mut self, value: LossType)

Sets loss_type to the provided enum value.

source

pub fn data_split_method(&self) -> DataSplitMethod

Returns the enum value of data_split_method, or the default if the field is set to an invalid enum value.

source

pub fn set_data_split_method(&mut self, value: DataSplitMethod)

Sets data_split_method to the provided enum value.

source

pub fn learn_rate_strategy(&self) -> LearnRateStrategy

Returns the enum value of learn_rate_strategy, or the default if the field is set to an invalid enum value.

source

pub fn set_learn_rate_strategy(&mut self, value: LearnRateStrategy)

Sets learn_rate_strategy to the provided enum value.

source

pub fn distance_type(&self) -> DistanceType

Returns the enum value of distance_type, or the default if the field is set to an invalid enum value.

source

pub fn set_distance_type(&mut self, value: DistanceType)

Sets distance_type to the provided enum value.

source

pub fn optimization_strategy(&self) -> OptimizationStrategy

Returns the enum value of optimization_strategy, or the default if the field is set to an invalid enum value.

source

pub fn set_optimization_strategy(&mut self, value: OptimizationStrategy)

Sets optimization_strategy to the provided enum value.

source

pub fn feedback_type(&self) -> FeedbackType

Returns the enum value of feedback_type, or the default if the field is set to an invalid enum value.

source

pub fn set_feedback_type(&mut self, value: FeedbackType)

Sets feedback_type to the provided enum value.

source

pub fn kmeans_initialization_method(&self) -> KmeansInitializationMethod

Returns the enum value of kmeans_initialization_method, or the default if the field is set to an invalid enum value.

source

pub fn set_kmeans_initialization_method( &mut self, value: KmeansInitializationMethod, )

Sets kmeans_initialization_method to the provided enum value.

source

pub fn data_frequency(&self) -> DataFrequency

Returns the enum value of data_frequency, or the default if the field is set to an invalid enum value.

source

pub fn set_data_frequency(&mut self, value: DataFrequency)

Sets data_frequency to the provided enum value.

source

pub fn holiday_region(&self) -> HolidayRegion

Returns the enum value of holiday_region, or the default if the field is set to an invalid enum value.

source

pub fn set_holiday_region(&mut self, value: HolidayRegion)

Sets holiday_region to the provided enum value.

source

pub fn hparam_tuning_objectives( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<HparamTuningObjective>>

Returns an iterator which yields the valid enum values contained in hparam_tuning_objectives.

source

pub fn push_hparam_tuning_objectives(&mut self, value: HparamTuningObjective)

Appends the provided enum value to hparam_tuning_objectives.

source

pub fn category_encoding_method(&self) -> EncodingMethod

Returns the enum value of category_encoding_method, or the default if the field is set to an invalid enum value.

source

pub fn set_category_encoding_method(&mut self, value: EncodingMethod)

Sets category_encoding_method to the provided enum value.

source

pub fn booster_type(&self) -> BoosterType

Returns the enum value of booster_type, or the default if the field is set to an invalid enum value.

source

pub fn set_booster_type(&mut self, value: BoosterType)

Sets booster_type to the provided enum value.

source

pub fn dart_normalize_type(&self) -> DartNormalizeType

Returns the enum value of dart_normalize_type, or the default if the field is set to an invalid enum value.

source

pub fn set_dart_normalize_type(&mut self, value: DartNormalizeType)

Sets dart_normalize_type to the provided enum value.

source

pub fn tree_method(&self) -> TreeMethod

Returns the enum value of tree_method, or the default if the field is set to an invalid enum value.

source

pub fn set_tree_method(&mut self, value: TreeMethod)

Sets tree_method to the provided enum value.

source

pub fn holiday_regions( &self, ) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<HolidayRegion>>

Returns an iterator which yields the valid enum values contained in holiday_regions.

source

pub fn push_holiday_regions(&mut self, value: HolidayRegion)

Appends the provided enum value to holiday_regions.

source

pub fn color_space(&self) -> ColorSpace

Returns the enum value of color_space, or the default if the field is set to an invalid enum value.

source

pub fn set_color_space(&mut self, value: ColorSpace)

Sets color_space to the provided enum value.

source

pub fn pca_solver(&self) -> PcaSolver

Returns the enum value of pca_solver, or the default if the field is set to an invalid enum value.

source

pub fn set_pca_solver(&mut self, value: PcaSolver)

Sets pca_solver to the provided enum value.

source

pub fn model_registry(&self) -> ModelRegistry

Returns the enum value of model_registry, or the default if the field is set to an invalid enum value.

source

pub fn set_model_registry(&mut self, value: ModelRegistry)

Sets model_registry to the provided enum value.

Trait Implementations§

source§

impl Clone for TrainingOptions

source§

fn clone(&self) -> TrainingOptions

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TrainingOptions

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TrainingOptions

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Message for TrainingOptions

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for TrainingOptions

source§

fn eq(&self, other: &TrainingOptions) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for TrainingOptions

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more