Class: Retab::ExperimentConfusionFlowMetric

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

Constant Summary collapse

HASH_ATTRS =
{
  source: :source,
  target: :target,
  score: :score
}.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) ⇒ ExperimentConfusionFlowMetric

Returns a new instance of ExperimentConfusionFlowMetric.



19
20
21
22
23
24
# File 'lib/retab/experiment_run_metrics/experiment_confusion_flow_metric.rb', line 19

def initialize(json)
  hash = self.class.normalize(json)
  @source = hash[:source]
  @target = hash[:target]
  @score = hash[:score]
end

Instance Attribute Details

#scoreObject

Returns the value of attribute score.



14
15
16
# File 'lib/retab/experiment_run_metrics/experiment_confusion_flow_metric.rb', line 14

def score
  @score
end

#sourceObject

Returns the value of attribute source.



14
15
16
# File 'lib/retab/experiment_run_metrics/experiment_confusion_flow_metric.rb', line 14

def source
  @source
end

#targetObject

Returns the value of attribute target.



14
15
16
# File 'lib/retab/experiment_run_metrics/experiment_confusion_flow_metric.rb', line 14

def target
  @target
end