Class: Google::Apis::PredictionV1_6::Analyze::ModelDescription

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

Overview

Description of the model.

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

Returns a new instance of ModelDescription



339
340
341
# File 'generated/google/apis/prediction_v1_6/classes.rb', line 339

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

Instance Attribute Details

#confusion_matrixHash<String,Hash<String,String>>

An output confusion matrix. This shows an estimate for how this model will do in predictions. This is first indexed by the true class label. For each true class label, this provides a pair predicted_label, count, where count is the estimated number of times the model will predict the predicted label given the true label. Will not output if more then 100 classes (Categorical models only). Corresponds to the JSON property confusionMatrix

Returns:

  • (Hash<String,Hash<String,String>>)


327
328
329
# File 'generated/google/apis/prediction_v1_6/classes.rb', line 327

def confusion_matrix
  @confusion_matrix
end

#confusion_matrix_row_totalsHash<String,String>

A list of the confusion matrix row totals. Corresponds to the JSON property confusionMatrixRowTotals

Returns:

  • (Hash<String,String>)


332
333
334
# File 'generated/google/apis/prediction_v1_6/classes.rb', line 332

def confusion_matrix_row_totals
  @confusion_matrix_row_totals
end

#modelinfoGoogle::Apis::PredictionV1_6::Insert2

Basic information about the model. Corresponds to the JSON property modelinfo



337
338
339
# File 'generated/google/apis/prediction_v1_6/classes.rb', line 337

def modelinfo
  @modelinfo
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



344
345
346
347
348
# File 'generated/google/apis/prediction_v1_6/classes.rb', line 344

def update!(**args)
  @confusion_matrix = args[:confusion_matrix] if args.key?(:confusion_matrix)
  @confusion_matrix_row_totals = args[:confusion_matrix_row_totals] if args.key?(:confusion_matrix_row_totals)
  @modelinfo = args[:modelinfo] if args.key?(:modelinfo)
end