gcp_bigquery_client::model::training_options

Struct TrainingOptions

Source
pub struct TrainingOptions {
Show 43 fields pub warm_start: Option<bool>, pub l_1_regularization: Option<f64>, pub input_label_columns: Option<Vec<String>>, pub feedback_type: Option<FeedbackType>, pub distance_type: Option<DistanceType>, pub learn_rate: Option<f64>, pub optimization_strategy: Option<OptimizationStrategy>, pub data_split_method: Option<DataSplitMethod>, pub item_column: Option<String>, pub data_split_eval_fraction: Option<f64>, pub hidden_units: Option<Vec<i64>>, pub num_clusters: Option<i64>, pub num_factors: Option<i64>, pub initial_learn_rate: Option<f64>, pub loss_type: Option<LossType>, pub min_relative_progress: Option<f64>, pub dropout: Option<f64>, pub horizon: Option<i64>, pub model_uri: Option<String>, pub min_split_loss: Option<f64>, pub batch_size: Option<i64>, pub time_series_timestamp_column: Option<String>, pub auto_arima: Option<bool>, pub wals_alpha: Option<f64>, pub kmeans_initialization_column: Option<String>, pub max_iterations: Option<i64>, pub preserve_input_structs: Option<bool>, pub label_class_weights: Option<HashMap<String, f64>>, pub learn_rate_strategy: Option<LearnRateStrategy>, pub kmeans_initialization_method: Option<KmeansInitializationMethod>, pub user_column: Option<String>, pub subsample: Option<f64>, pub l_2_regularization: Option<f64>, pub auto_arima_max_order: Option<i64>, pub max_tree_depth: Option<i64>, pub time_series_data_column: Option<String>, pub data_split_column: Option<String>, pub non_seasonal_order: Option<ArimaOrder>, pub include_drift: Option<bool>, pub early_stop: Option<bool>, pub holiday_region: Option<HolidayRegion>, pub data_frequency: Option<DataFrequency>, pub time_series_id_column: Option<String>,
}

Fields§

§warm_start: Option<bool>

Whether to train a model from the last checkpoint.

§l_1_regularization: Option<f64>

L1 regularization coefficient.

§input_label_columns: Option<Vec<String>>

Name of input label columns in training data.

§feedback_type: Option<FeedbackType>

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

§distance_type: Option<DistanceType>

Distance type for clustering models.

§learn_rate: Option<f64>

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

§optimization_strategy: Option<OptimizationStrategy>

Optimization strategy for training linear regression models.

§data_split_method: Option<DataSplitMethod>

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

§item_column: Option<String>

Item column specified for matrix factorization models.

§data_split_eval_fraction: Option<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.

§hidden_units: Option<Vec<i64>>

Hidden units for dnn models.

§num_clusters: Option<i64>

Number of clusters for clustering models.

§num_factors: Option<i64>

Num factors specified for matrix factorization models.

§initial_learn_rate: Option<f64>

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

§loss_type: Option<LossType>

Type of loss function used during training run.

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

§dropout: Option<f64>

Dropout probability for dnn models.

§horizon: Option<i64>

The number of periods ahead that need to be forecasted.

§model_uri: Option<String>

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

§min_split_loss: Option<f64>

Minimum split loss for boosted tree models.

§batch_size: Option<i64>

Batch size for dnn models.

§time_series_timestamp_column: Option<String>

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

§auto_arima: Option<bool>

Whether to enable auto ARIMA or not.

§wals_alpha: Option<f64>

Hyperparameter for matrix factoration when implicit feedback type is specified.

§kmeans_initialization_column: Option<String>

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

§max_iterations: Option<i64>

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

§preserve_input_structs: Option<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.

§label_class_weights: Option<HashMap<String, f64>>

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

§learn_rate_strategy: Option<LearnRateStrategy>

The strategy to determine learn rate for the current iteration.

§kmeans_initialization_method: Option<KmeansInitializationMethod>

The method used to initialize the centroids for kmeans algorithm.

§user_column: Option<String>

User column specified for matrix factorization models.

§subsample: Option<f64>

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

§l_2_regularization: Option<f64>

L2 regularization coefficient.

§auto_arima_max_order: Option<i64>

The max value of non-seasonal p and q.

§max_tree_depth: Option<i64>

Maximum depth of a tree for boosted tree models.

§time_series_data_column: Option<String>

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

§data_split_column: Option<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

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

§include_drift: Option<bool>

Include drift when fitting an ARIMA model.

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

§holiday_region: Option<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.

§data_frequency: Option<DataFrequency>

The data frequency of a time series.

§time_series_id_column: Option<String>

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

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() -> TrainingOptions

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

impl<'de> Deserialize<'de> for TrainingOptions

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for TrainingOptions

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn from_ref(input: &T) -> T

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

impl<T> Instrument for T

Source§

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

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

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,

Source§

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>,

Source§

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>,

Source§

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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T