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.



5405
5406
5407
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5405

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)


5288
5289
5290
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5288

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)


5294
5295
5296
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5294

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)


5304
5305
5306
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5304

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)


5309
5310
5311
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5309

def description
  @description
end

#encryption_configurationGoogle::Apis::BigqueryV2::EncryptionConfiguration

Custom encryption configuration (e.g., Cloud KMS keys). This shows the encryption configuration of the model data while stored in BigQuery storage. This field can be used with PatchModel to update encryption key for an already encrypted model. Corresponds to the JSON property encryptionConfiguration



5317
5318
5319
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5317

def encryption_configuration
  @encryption_configuration
end

#etagString

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

Returns:

  • (String)


5322
5323
5324
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5322

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)


5331
5332
5333
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5331

def expiration_time
  @expiration_time
end

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

Output only. Input feature columns that were used to train this model. Corresponds to the JSON property featureColumns



5336
5337
5338
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5336

def feature_columns
  @feature_columns
end

#friendly_nameString

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

Returns:

  • (String)


5341
5342
5343
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5341

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



5346
5347
5348
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5346

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



5352
5353
5354
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5352

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



5358
5359
5360
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5358

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


5367
5368
5369
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5367

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)


5373
5374
5375
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5373

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)


5379
5380
5381
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5379

def location
  @location
end

#model_referenceGoogle::Apis::BigqueryV2::ModelReference

Required. Unique identifier for this model. Corresponds to the JSON property modelReference



5384
5385
5386
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5384

def model_reference
  @model_reference
end

#model_typeString

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

Returns:

  • (String)


5389
5390
5391
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5389

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


5398
5399
5400
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5398

def optimal_trial_ids
  @optimal_trial_ids
end

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

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



5403
5404
5405
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5403

def training_runs
  @training_runs
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
# File 'lib/google/apis/bigquery_v2/classes.rb', line 5410

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)
  @training_runs = args[:training_runs] if args.key?(:training_runs)
end