Class: Retab::ExperimentConfusionSummaryAggregate
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ExperimentConfusionSummaryAggregate
- 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
-
#diag ⇒ Object
Returns the value of attribute diag.
-
#flows ⇒ Object
Returns the value of attribute flows.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ExperimentConfusionSummaryAggregate
constructor
A new instance of ExperimentConfusionSummaryAggregate.
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
#diag ⇒ Object
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 |
#flows ⇒ Object
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 |