Class: Retab::ExperimentConfusionSummaryAggregate

Inherits:
Types::BaseModel show all
Defined in:
lib/retab/experiment_run_metrics/experiment_confusion_summary_aggregate.rb

Constant Summary collapse

HASH_ATTRS =
{
  diag: :diag,
  flows: :flows
}.freeze

Instance Attribute Summary collapse

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

#inspect, normalize, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ ExperimentConfusionSummaryAggregate

Returns a new instance of ExperimentConfusionSummaryAggregate.



17
18
19
20
21
# File 'lib/retab/experiment_run_metrics/experiment_confusion_summary_aggregate.rb', line 17

def initialize(json)
  hash = self.class.normalize(json)
  @diag = hash[:diag] || {}
  @flows = (hash[:flows] || []).map { |item| item ? Retab::ExperimentConfusionFlowMetric.new(item) : nil }
end

Instance Attribute Details

#diagObject

Returns the value of attribute diag.



13
14
15
# File 'lib/retab/experiment_run_metrics/experiment_confusion_summary_aggregate.rb', line 13

def diag
  @diag
end

#flowsObject

Returns the value of attribute flows.



13
14
15
# File 'lib/retab/experiment_run_metrics/experiment_confusion_summary_aggregate.rb', line 13

def flows
  @flows
end