class Google::Apis::BigqueryV2::TrainingOptions

Options used in model training.

Attributes

adjust_step_changes[RW]

If true, detect step changes and make data adjustment in the input time series. Corresponds to the JSON property `adjustStepChanges` @return [Boolean]

adjust_step_changes?[RW]

If true, detect step changes and make data adjustment in the input time series. Corresponds to the JSON property `adjustStepChanges` @return [Boolean]

auto_arima[RW]

Whether to enable auto ARIMA or not. Corresponds to the JSON property `autoArima` @return [Boolean]

auto_arima?[RW]

Whether to enable auto ARIMA or not. Corresponds to the JSON property `autoArima` @return [Boolean]

auto_arima_max_order[RW]

The max value of non-seasonal p and q. Corresponds to the JSON property `autoArimaMaxOrder` @return [Fixnum]

batch_size[RW]

Batch size for dnn models. Corresponds to the JSON property `batchSize` @return [Fixnum]

clean_spikes_and_dips[RW]

If true, clean spikes and dips in the input time series. Corresponds to the JSON property `cleanSpikesAndDips` @return [Boolean]

clean_spikes_and_dips?[RW]

If true, clean spikes and dips in the input time series. Corresponds to the JSON property `cleanSpikesAndDips` @return [Boolean]

data_frequency[RW]

The data frequency of a time series. Corresponds to the JSON property `dataFrequency` @return [String]

data_split_column[RW]

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: cloud.google.com/bigquery/docs/reference/standard-sql/data-types#data- type-properties Corresponds to the JSON property `dataSplitColumn` @return [String]

data_split_eval_fraction[RW]

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. Corresponds to the JSON property `dataSplitEvalFraction` @return [Float]

data_split_method[RW]

The data split type for training and evaluation, e.g. RANDOM. Corresponds to the JSON property `dataSplitMethod` @return [String]

decompose_time_series[RW]

If true, perform decompose time series and save the results. Corresponds to the JSON property `decomposeTimeSeries` @return [Boolean]

decompose_time_series?[RW]

If true, perform decompose time series and save the results. Corresponds to the JSON property `decomposeTimeSeries` @return [Boolean]

distance_type[RW]

Distance type for clustering models. Corresponds to the JSON property `distanceType` @return [String]

dropout[RW]

Dropout probability for dnn models. Corresponds to the JSON property `dropout` @return [Float]

early_stop[RW]

Whether to stop early when the loss doesn't improve significantly any more ( compared to min_relative_progress). Used only for iterative training algorithms. Corresponds to the JSON property `earlyStop` @return [Boolean]

early_stop?[RW]

Whether to stop early when the loss doesn't improve significantly any more ( compared to min_relative_progress). Used only for iterative training algorithms. Corresponds to the JSON property `earlyStop` @return [Boolean]

feedback_type[RW]

Feedback type that specifies which algorithm to run for matrix factorization. Corresponds to the JSON property `feedbackType` @return [String]

hidden_units[RW]

Hidden units for dnn models. Corresponds to the JSON property `hiddenUnits` @return [Array<Fixnum>]

holiday_region[RW]

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. Corresponds to the JSON property `holidayRegion` @return [String]

horizon[RW]

The number of periods ahead that need to be forecasted. Corresponds to the JSON property `horizon` @return [Fixnum]

include_drift[RW]

Include drift when fitting an ARIMA model. Corresponds to the JSON property `includeDrift` @return [Boolean]

include_drift?[RW]

Include drift when fitting an ARIMA model. Corresponds to the JSON property `includeDrift` @return [Boolean]

initial_learn_rate[RW]

Specifies the initial learning rate for the line search learn rate strategy. Corresponds to the JSON property `initialLearnRate` @return [Float]

input_label_columns[RW]

Name of input label columns in training data. Corresponds to the JSON property `inputLabelColumns` @return [Array<String>]

item_column[RW]

Item column specified for matrix factorization models. Corresponds to the JSON property `itemColumn` @return [String]

kmeans_initialization_column[RW]

The column used to provide the initial centroids for kmeans algorithm when kmeans_initialization_method is CUSTOM. Corresponds to the JSON property `kmeansInitializationColumn` @return [String]

kmeans_initialization_method[RW]

The method used to initialize the centroids for kmeans algorithm. Corresponds to the JSON property `kmeansInitializationMethod` @return [String]

l1_regularization[RW]

L1 regularization coefficient. Corresponds to the JSON property `l1Regularization` @return [Float]

l2_regularization[RW]

L2 regularization coefficient. Corresponds to the JSON property `l2Regularization` @return [Float]

label_class_weights[RW]

Weights associated with each label class, for rebalancing the training data. Only applicable for classification models. Corresponds to the JSON property `labelClassWeights` @return [Hash<String,Float>]

learn_rate[RW]

Learning rate in training. Used only for iterative training algorithms. Corresponds to the JSON property `learnRate` @return [Float]

learn_rate_strategy[RW]

The strategy to determine learn rate for the current iteration. Corresponds to the JSON property `learnRateStrategy` @return [String]

loss_type[RW]

Type of loss function used during training run. Corresponds to the JSON property `lossType` @return [String]

max_iterations[RW]

The maximum number of iterations in training. Used only for iterative training algorithms. Corresponds to the JSON property `maxIterations` @return [Fixnum]

max_tree_depth[RW]

Maximum depth of a tree for boosted tree models. Corresponds to the JSON property `maxTreeDepth` @return [Fixnum]

min_relative_progress[RW]

When early_stop is true, stops training when accuracy improvement is less than 'min_relative_progress'. Used only for iterative training algorithms. Corresponds to the JSON property `minRelativeProgress` @return [Float]

min_split_loss[RW]

Minimum split loss for boosted tree models. Corresponds to the JSON property `minSplitLoss` @return [Float]

model_uri[RW]

Google Cloud Storage URI from which the model was imported. Only applicable for imported models. Corresponds to the JSON property `modelUri` @return [String]

non_seasonal_order[RW]

Arima order, can be used for both non-seasonal and seasonal parts. Corresponds to the JSON property `nonSeasonalOrder` @return [Google::Apis::BigqueryV2::ArimaOrder]

num_clusters[RW]

Number of clusters for clustering models. Corresponds to the JSON property `numClusters` @return [Fixnum]

num_factors[RW]

Num factors specified for matrix factorization models. Corresponds to the JSON property `numFactors` @return [Fixnum]

optimization_strategy[RW]

Optimization strategy for training linear regression models. Corresponds to the JSON property `optimizationStrategy` @return [String]

preserve_input_structs[RW]

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. Corresponds to the JSON property `preserveInputStructs` @return [Boolean]

preserve_input_structs?[RW]

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. Corresponds to the JSON property `preserveInputStructs` @return [Boolean]

subsample[RW]

Subsample fraction of the training data to grow tree to prevent overfitting for boosted tree models. Corresponds to the JSON property `subsample` @return [Float]

time_series_data_column[RW]

Column to be designated as time series data for ARIMA model. Corresponds to the JSON property `timeSeriesDataColumn` @return [String]

time_series_id_column[RW]

The time series id column that was used during ARIMA model training. Corresponds to the JSON property `timeSeriesIdColumn` @return [String]

time_series_id_columns[RW]

The time series id columns that were used during ARIMA model training. Corresponds to the JSON property `timeSeriesIdColumns` @return [Array<String>]

time_series_timestamp_column[RW]

Column to be designated as time series timestamp for ARIMA model. Corresponds to the JSON property `timeSeriesTimestampColumn` @return [String]

user_column[RW]

User column specified for matrix factorization models. Corresponds to the JSON property `userColumn` @return [String]

wals_alpha[RW]

Hyperparameter for matrix factoration when implicit feedback type is specified. Corresponds to the JSON property `walsAlpha` @return [Float]

warm_start[RW]

Whether to train a model from the last checkpoint. Corresponds to the JSON property `warmStart` @return [Boolean]

warm_start?[RW]

Whether to train a model from the last checkpoint. Corresponds to the JSON property `warmStart` @return [Boolean]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/bigquery_v2/classes.rb, line 7314
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/bigquery_v2/classes.rb, line 7319
def update!(**args)
  @adjust_step_changes = args[:adjust_step_changes] if args.key?(:adjust_step_changes)
  @auto_arima = args[:auto_arima] if args.key?(:auto_arima)
  @auto_arima_max_order = args[:auto_arima_max_order] if args.key?(:auto_arima_max_order)
  @batch_size = args[:batch_size] if args.key?(:batch_size)
  @clean_spikes_and_dips = args[:clean_spikes_and_dips] if args.key?(:clean_spikes_and_dips)
  @data_frequency = args[:data_frequency] if args.key?(:data_frequency)
  @data_split_column = args[:data_split_column] if args.key?(:data_split_column)
  @data_split_eval_fraction = args[:data_split_eval_fraction] if args.key?(:data_split_eval_fraction)
  @data_split_method = args[:data_split_method] if args.key?(:data_split_method)
  @decompose_time_series = args[:decompose_time_series] if args.key?(:decompose_time_series)
  @distance_type = args[:distance_type] if args.key?(:distance_type)
  @dropout = args[:dropout] if args.key?(:dropout)
  @early_stop = args[:early_stop] if args.key?(:early_stop)
  @feedback_type = args[:feedback_type] if args.key?(:feedback_type)
  @hidden_units = args[:hidden_units] if args.key?(:hidden_units)
  @holiday_region = args[:holiday_region] if args.key?(:holiday_region)
  @horizon = args[:horizon] if args.key?(:horizon)
  @include_drift = args[:include_drift] if args.key?(:include_drift)
  @initial_learn_rate = args[:initial_learn_rate] if args.key?(:initial_learn_rate)
  @input_label_columns = args[:input_label_columns] if args.key?(:input_label_columns)
  @item_column = args[:item_column] if args.key?(:item_column)
  @kmeans_initialization_column = args[:kmeans_initialization_column] if args.key?(:kmeans_initialization_column)
  @kmeans_initialization_method = args[:kmeans_initialization_method] if args.key?(:kmeans_initialization_method)
  @l1_regularization = args[:l1_regularization] if args.key?(:l1_regularization)
  @l2_regularization = args[:l2_regularization] if args.key?(:l2_regularization)
  @label_class_weights = args[:label_class_weights] if args.key?(:label_class_weights)
  @learn_rate = args[:learn_rate] if args.key?(:learn_rate)
  @learn_rate_strategy = args[:learn_rate_strategy] if args.key?(:learn_rate_strategy)
  @loss_type = args[:loss_type] if args.key?(:loss_type)
  @max_iterations = args[:max_iterations] if args.key?(:max_iterations)
  @max_tree_depth = args[:max_tree_depth] if args.key?(:max_tree_depth)
  @min_relative_progress = args[:min_relative_progress] if args.key?(:min_relative_progress)
  @min_split_loss = args[:min_split_loss] if args.key?(:min_split_loss)
  @model_uri = args[:model_uri] if args.key?(:model_uri)
  @non_seasonal_order = args[:non_seasonal_order] if args.key?(:non_seasonal_order)
  @num_clusters = args[:num_clusters] if args.key?(:num_clusters)
  @num_factors = args[:num_factors] if args.key?(:num_factors)
  @optimization_strategy = args[:optimization_strategy] if args.key?(:optimization_strategy)
  @preserve_input_structs = args[:preserve_input_structs] if args.key?(:preserve_input_structs)
  @subsample = args[:subsample] if args.key?(:subsample)
  @time_series_data_column = args[:time_series_data_column] if args.key?(:time_series_data_column)
  @time_series_id_column = args[:time_series_id_column] if args.key?(:time_series_id_column)
  @time_series_id_columns = args[:time_series_id_columns] if args.key?(:time_series_id_columns)
  @time_series_timestamp_column = args[:time_series_timestamp_column] if args.key?(:time_series_timestamp_column)
  @user_column = args[:user_column] if args.key?(:user_column)
  @wals_alpha = args[:wals_alpha] if args.key?(:wals_alpha)
  @warm_start = args[:warm_start] if args.key?(:warm_start)
end