Class: Google::Apis::BigqueryV2::Model

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/bigquery_v2/classes.rb,
lib/google/apis/bigquery_v2/representations.rb,
lib/google/apis/bigquery_v2/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Model

Returns a new instance of Model.



6711
6712
6713
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6711

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#best_trial_idFixnum

The best trial_id across all training runs. Corresponds to the JSON property bestTrialId

Returns:

  • (Fixnum)


6584
6585
6586
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6584

def best_trial_id
  @best_trial_id
end

#creation_timeFixnum

Output only. The time when this model was created, in millisecs since the epoch. Corresponds to the JSON property creationTime

Returns:

  • (Fixnum)


6590
6591
6592
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6590

def creation_time
  @creation_time
end

#default_trial_idFixnum

Output only. The default trial_id to use in TVFs when the trial_id is not passed in. For single-objective hyperparameter tuning models, this is the best trial ID. For multi-objective hyperparameter tuning models, this is the smallest trial ID among all Pareto optimal trials. Corresponds to the JSON property defaultTrialId

Returns:

  • (Fixnum)


6600
6601
6602
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6600

def default_trial_id
  @default_trial_id
end

#descriptionString

Optional. A user-friendly description of this model. Corresponds to the JSON property description

Returns:

  • (String)


6605
6606
6607
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6605

def description
  @description
end

#encryption_configurationGoogle::Apis::BigqueryV2::EncryptionConfiguration

Configuration for Cloud KMS encryption settings. Corresponds to the JSON property encryptionConfiguration



6610
6611
6612
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6610

def encryption_configuration
  @encryption_configuration
end

#etagString

Output only. A hash of this resource. Corresponds to the JSON property etag

Returns:

  • (String)


6615
6616
6617
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6615

def etag
  @etag
end

#expiration_timeFixnum

Optional. The time when this model expires, in milliseconds since the epoch. If not present, the model will persist indefinitely. Expired models will be deleted and their storage reclaimed. The defaultTableExpirationMs property of the encapsulating dataset can be used to set a default expirationTime on newly created models. Corresponds to the JSON property expirationTime

Returns:

  • (Fixnum)


6624
6625
6626
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6624

def expiration_time
  @expiration_time
end

#feature_columnsArray<Google::Apis::BigqueryV2::StandardSqlField>

Output only. Input feature columns for the model inference. If the model is trained with TRANSFORM clause, these are the input of the TRANSFORM clause. Corresponds to the JSON property featureColumns



6630
6631
6632
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6630

def feature_columns
  @feature_columns
end

#friendly_nameString

Optional. A descriptive name for this model. Corresponds to the JSON property friendlyName

Returns:

  • (String)


6635
6636
6637
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6635

def friendly_name
  @friendly_name
end

#hparam_search_spacesGoogle::Apis::BigqueryV2::HparamSearchSpaces

Hyperparameter search spaces. These should be a subset of training_options. Corresponds to the JSON property hparamSearchSpaces



6640
6641
6642
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6640

def hparam_search_spaces
  @hparam_search_spaces
end

#hparam_trialsArray<Google::Apis::BigqueryV2::HparamTuningTrial>

Output only. Trials of a hyperparameter tuning model sorted by trial_id. Corresponds to the JSON property hparamTrials



6646
6647
6648
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6646

def hparam_trials
  @hparam_trials
end

#label_columnsArray<Google::Apis::BigqueryV2::StandardSqlField>

Output only. Label columns that were used to train this model. The output of the model will have a "predicted_" prefix to these columns. Corresponds to the JSON property labelColumns



6652
6653
6654
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6652

def label_columns
  @label_columns
end

#labelsHash<String,String>

The labels associated with this model. You can use these to organize and group your models. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter and each label in the list must have a different key. Corresponds to the JSON property labels

Returns:

  • (Hash<String,String>)


6661
6662
6663
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6661

def labels
  @labels
end

#last_modified_timeFixnum

Output only. The time when this model was last modified, in millisecs since the epoch. Corresponds to the JSON property lastModifiedTime

Returns:

  • (Fixnum)


6667
6668
6669
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6667

def last_modified_time
  @last_modified_time
end

#locationString

Output only. The geographic location where the model resides. This value is inherited from the dataset. Corresponds to the JSON property location

Returns:

  • (String)


6673
6674
6675
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6673

def location
  @location
end

#model_referenceGoogle::Apis::BigqueryV2::ModelReference

Id path of a model. Corresponds to the JSON property modelReference



6678
6679
6680
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6678

def model_reference
  @model_reference
end

#model_typeString

Output only. Type of the model resource. Corresponds to the JSON property modelType

Returns:

  • (String)


6683
6684
6685
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6683

def model_type
  @model_type
end

#optimal_trial_idsArray<Fixnum>

Output only. For single-objective hyperparameter tuning models, it only contains the best trial. For multi-objective hyperparameter tuning models, it contains all Pareto optimal trials sorted by trial_id. Corresponds to the JSON property optimalTrialIds

Returns:

  • (Array<Fixnum>)


6692
6693
6694
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6692

def optimal_trial_ids
  @optimal_trial_ids
end

#remote_model_infoGoogle::Apis::BigqueryV2::RemoteModelInfo

Remote Model Info Corresponds to the JSON property remoteModelInfo



6697
6698
6699
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6697

def remote_model_info
  @remote_model_info
end

#training_runsArray<Google::Apis::BigqueryV2::TrainingRun>

Information for all training runs in increasing order of start_time. Corresponds to the JSON property trainingRuns



6702
6703
6704
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6702

def training_runs
  @training_runs
end

#transform_columnsArray<Google::Apis::BigqueryV2::TransformColumn>

Output only. This field will be populated if a TRANSFORM clause was used to train a model. TRANSFORM clause (if used) takes feature_columns as input and outputs transform_columns. transform_columns then are used to train the model. Corresponds to the JSON property transformColumns



6709
6710
6711
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6709

def transform_columns
  @transform_columns
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6716

def update!(**args)
  @best_trial_id = args[:best_trial_id] if args.key?(:best_trial_id)
  @creation_time = args[:creation_time] if args.key?(:creation_time)
  @default_trial_id = args[:default_trial_id] if args.key?(:default_trial_id)
  @description = args[:description] if args.key?(:description)
  @encryption_configuration = args[:encryption_configuration] if args.key?(:encryption_configuration)
  @etag = args[:etag] if args.key?(:etag)
  @expiration_time = args[:expiration_time] if args.key?(:expiration_time)
  @feature_columns = args[:feature_columns] if args.key?(:feature_columns)
  @friendly_name = args[:friendly_name] if args.key?(:friendly_name)
  @hparam_search_spaces = args[:hparam_search_spaces] if args.key?(:hparam_search_spaces)
  @hparam_trials = args[:hparam_trials] if args.key?(:hparam_trials)
  @label_columns = args[:label_columns] if args.key?(:label_columns)
  @labels = args[:labels] if args.key?(:labels)
  @last_modified_time = args[:last_modified_time] if args.key?(:last_modified_time)
  @location = args[:location] if args.key?(:location)
  @model_reference = args[:model_reference] if args.key?(:model_reference)
  @model_type = args[:model_type] if args.key?(:model_type)
  @optimal_trial_ids = args[:optimal_trial_ids] if args.key?(:optimal_trial_ids)
  @remote_model_info = args[:remote_model_info] if args.key?(:remote_model_info)
  @training_runs = args[:training_runs] if args.key?(:training_runs)
  @transform_columns = args[:transform_columns] if args.key?(:transform_columns)
end