Class: Google::Apis::BigqueryV2::IterationResult

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ IterationResult

Returns a new instance of IterationResult



1254
1255
1256
# File 'generated/google/apis/bigquery_v2/classes.rb', line 1254

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

Instance Attribute Details

#duration_msFixnum

[Output-only, Beta] Time taken to run the training iteration in milliseconds. Corresponds to the JSON property durationMs

Returns:

  • (Fixnum)


1226
1227
1228
# File 'generated/google/apis/bigquery_v2/classes.rb', line 1226

def duration_ms
  @duration_ms
end

#eval_lossFloat

[Output-only, Beta] Eval loss computed on the eval data at the end of the iteration. The eval loss is used for early stopping to avoid overfitting. No eval loss if eval_split_method option is specified as no_split or auto_split with input data size less than 500 rows. Corresponds to the JSON property evalLoss

Returns:

  • (Float)


1234
1235
1236
# File 'generated/google/apis/bigquery_v2/classes.rb', line 1234

def eval_loss
  @eval_loss
end

#indexFixnum

[Output-only, Beta] Index of the ML training iteration, starting from zero for each training run. Corresponds to the JSON property index

Returns:

  • (Fixnum)


1240
1241
1242
# File 'generated/google/apis/bigquery_v2/classes.rb', line 1240

def index
  @index
end

#learn_rateFloat

[Output-only, Beta] Learning rate used for this iteration, it varies for different training iterations if learn_rate_strategy option is not constant. Corresponds to the JSON property learnRate

Returns:

  • (Float)


1246
1247
1248
# File 'generated/google/apis/bigquery_v2/classes.rb', line 1246

def learn_rate
  @learn_rate
end

#training_lossFloat

[Output-only, Beta] Training loss computed on the training data at the end of the iteration. The training loss function is defined by model type. Corresponds to the JSON property trainingLoss

Returns:

  • (Float)


1252
1253
1254
# File 'generated/google/apis/bigquery_v2/classes.rb', line 1252

def training_loss
  @training_loss
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1259
1260
1261
1262
1263
1264
1265
# File 'generated/google/apis/bigquery_v2/classes.rb', line 1259

def update!(**args)
  @duration_ms = args[:duration_ms] if args.key?(:duration_ms)
  @eval_loss = args[:eval_loss] if args.key?(:eval_loss)
  @index = args[:index] if args.key?(:index)
  @learn_rate = args[:learn_rate] if args.key?(:learn_rate)
  @training_loss = args[:training_loss] if args.key?(:training_loss)
end