Struct google_api_proto::google::cloud::bigquery::v2::model::training_run::TrainingOptions
source · 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.
- 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.
- 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 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
impl TrainingOptions
sourcepub fn loss_type(&self) -> LossType
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.
sourcepub fn set_loss_type(&mut self, value: LossType)
pub fn set_loss_type(&mut self, value: LossType)
Sets loss_type
to the provided enum value.
sourcepub fn data_split_method(&self) -> DataSplitMethod
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.
sourcepub fn set_data_split_method(&mut self, value: DataSplitMethod)
pub fn set_data_split_method(&mut self, value: DataSplitMethod)
Sets data_split_method
to the provided enum value.
sourcepub fn learn_rate_strategy(&self) -> LearnRateStrategy
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.
sourcepub fn set_learn_rate_strategy(&mut self, value: LearnRateStrategy)
pub fn set_learn_rate_strategy(&mut self, value: LearnRateStrategy)
Sets learn_rate_strategy
to the provided enum value.
sourcepub fn distance_type(&self) -> DistanceType
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.
sourcepub fn set_distance_type(&mut self, value: DistanceType)
pub fn set_distance_type(&mut self, value: DistanceType)
Sets distance_type
to the provided enum value.
sourcepub fn optimization_strategy(&self) -> OptimizationStrategy
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.
sourcepub fn set_optimization_strategy(&mut self, value: OptimizationStrategy)
pub fn set_optimization_strategy(&mut self, value: OptimizationStrategy)
Sets optimization_strategy
to the provided enum value.
sourcepub fn feedback_type(&self) -> FeedbackType
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.
sourcepub fn set_feedback_type(&mut self, value: FeedbackType)
pub fn set_feedback_type(&mut self, value: FeedbackType)
Sets feedback_type
to the provided enum value.
sourcepub fn kmeans_initialization_method(&self) -> KmeansInitializationMethod
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.
sourcepub fn set_kmeans_initialization_method(
&mut self,
value: KmeansInitializationMethod,
)
pub fn set_kmeans_initialization_method( &mut self, value: KmeansInitializationMethod, )
Sets kmeans_initialization_method
to the provided enum value.
sourcepub fn data_frequency(&self) -> DataFrequency
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.
sourcepub fn set_data_frequency(&mut self, value: DataFrequency)
pub fn set_data_frequency(&mut self, value: DataFrequency)
Sets data_frequency
to the provided enum value.
sourcepub fn holiday_region(&self) -> HolidayRegion
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.
sourcepub fn set_holiday_region(&mut self, value: HolidayRegion)
pub fn set_holiday_region(&mut self, value: HolidayRegion)
Sets holiday_region
to the provided enum value.
sourcepub fn hparam_tuning_objectives(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<HparamTuningObjective>>
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
.
sourcepub fn push_hparam_tuning_objectives(&mut self, value: HparamTuningObjective)
pub fn push_hparam_tuning_objectives(&mut self, value: HparamTuningObjective)
Appends the provided enum value to hparam_tuning_objectives
.
sourcepub fn category_encoding_method(&self) -> EncodingMethod
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.
sourcepub fn set_category_encoding_method(&mut self, value: EncodingMethod)
pub fn set_category_encoding_method(&mut self, value: EncodingMethod)
Sets category_encoding_method
to the provided enum value.
sourcepub fn booster_type(&self) -> BoosterType
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.
sourcepub fn set_booster_type(&mut self, value: BoosterType)
pub fn set_booster_type(&mut self, value: BoosterType)
Sets booster_type
to the provided enum value.
sourcepub fn dart_normalize_type(&self) -> DartNormalizeType
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.
sourcepub fn set_dart_normalize_type(&mut self, value: DartNormalizeType)
pub fn set_dart_normalize_type(&mut self, value: DartNormalizeType)
Sets dart_normalize_type
to the provided enum value.
sourcepub fn tree_method(&self) -> TreeMethod
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.
sourcepub fn set_tree_method(&mut self, value: TreeMethod)
pub fn set_tree_method(&mut self, value: TreeMethod)
Sets tree_method
to the provided enum value.
sourcepub fn holiday_regions(
&self,
) -> FilterMap<Cloned<Iter<'_, i32>>, fn(_: i32) -> Option<HolidayRegion>>
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
.
sourcepub fn push_holiday_regions(&mut self, value: HolidayRegion)
pub fn push_holiday_regions(&mut self, value: HolidayRegion)
Appends the provided enum value to holiday_regions
.
sourcepub fn color_space(&self) -> ColorSpace
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.
sourcepub fn set_color_space(&mut self, value: ColorSpace)
pub fn set_color_space(&mut self, value: ColorSpace)
Sets color_space
to the provided enum value.
sourcepub fn pca_solver(&self) -> PcaSolver
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.
sourcepub fn set_pca_solver(&mut self, value: PcaSolver)
pub fn set_pca_solver(&mut self, value: PcaSolver)
Sets pca_solver
to the provided enum value.
sourcepub fn model_registry(&self) -> ModelRegistry
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.
sourcepub fn set_model_registry(&mut self, value: ModelRegistry)
pub fn set_model_registry(&mut self, value: ModelRegistry)
Sets model_registry
to the provided enum value.
Trait Implementations§
source§impl Clone for TrainingOptions
impl Clone for TrainingOptions
source§fn clone(&self) -> TrainingOptions
fn clone(&self) -> TrainingOptions
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for TrainingOptions
impl Debug for TrainingOptions
source§impl Default for TrainingOptions
impl Default for TrainingOptions
source§impl Message for TrainingOptions
impl Message for TrainingOptions
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for TrainingOptions
impl PartialEq for TrainingOptions
source§fn eq(&self, other: &TrainingOptions) -> bool
fn eq(&self, other: &TrainingOptions) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for TrainingOptions
Auto Trait Implementations§
impl Freeze for TrainingOptions
impl RefUnwindSafe for TrainingOptions
impl Send for TrainingOptions
impl Sync for TrainingOptions
impl Unpin for TrainingOptions
impl UnwindSafe for TrainingOptions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request