Class: Retab::ExperimentByTargetMetricsResponse
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::ExperimentByTargetMetricsResponse
- Defined in:
- lib/retab/experiment_run_metrics/experiment_by_target_metrics_response.rb
Constant Summary collapse
- HASH_ATTRS =
{ run_id: :run_id, kind: :kind, view: :view, target: :target, score: :score, prior_score: :prior_score, confusion: :confusion, documents: :documents }.freeze
Instance Attribute Summary collapse
-
#confusion ⇒ Object
Returns the value of attribute confusion.
-
#documents ⇒ Object
Returns the value of attribute documents.
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#prior_score ⇒ Object
Returns the value of attribute prior_score.
-
#run_id ⇒ Object
Returns the value of attribute run_id.
-
#score ⇒ Object
Returns the value of attribute score.
-
#target ⇒ Object
Returns the value of attribute target.
-
#view ⇒ Object
Returns the value of attribute view.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ ExperimentByTargetMetricsResponse
constructor
A new instance of ExperimentByTargetMetricsResponse.
Methods inherited from Types::BaseModel
#inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ ExperimentByTargetMetricsResponse
Returns a new instance of ExperimentByTargetMetricsResponse.
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/retab/experiment_run_metrics/experiment_by_target_metrics_response.rb', line 29 def initialize(json) hash = self.class.normalize(json) @run_id = hash[:run_id] @kind = hash[:kind] @view = hash[:view] @target = hash[:target] @score = hash[:score] @prior_score = hash[:prior_score] @confusion = hash[:confusion] ? Retab::ExperimentTargetConfusionMetric.new(hash[:confusion]) : nil @documents = (hash[:documents] || []).map { |item| item ? Retab::ExperimentByTargetDocumentMetric.new(item) : nil } end |
Instance Attribute Details
#confusion ⇒ Object
Returns the value of attribute confusion.
19 20 21 |
# File 'lib/retab/experiment_run_metrics/experiment_by_target_metrics_response.rb', line 19 def confusion @confusion end |
#documents ⇒ Object
Returns the value of attribute documents.
19 20 21 |
# File 'lib/retab/experiment_run_metrics/experiment_by_target_metrics_response.rb', line 19 def documents @documents end |
#kind ⇒ Object
Returns the value of attribute kind.
19 20 21 |
# File 'lib/retab/experiment_run_metrics/experiment_by_target_metrics_response.rb', line 19 def kind @kind end |
#prior_score ⇒ Object
Returns the value of attribute prior_score.
19 20 21 |
# File 'lib/retab/experiment_run_metrics/experiment_by_target_metrics_response.rb', line 19 def prior_score @prior_score end |
#run_id ⇒ Object
Returns the value of attribute run_id.
19 20 21 |
# File 'lib/retab/experiment_run_metrics/experiment_by_target_metrics_response.rb', line 19 def run_id @run_id end |
#score ⇒ Object
Returns the value of attribute score.
19 20 21 |
# File 'lib/retab/experiment_run_metrics/experiment_by_target_metrics_response.rb', line 19 def score @score end |
#target ⇒ Object
Returns the value of attribute target.
19 20 21 |
# File 'lib/retab/experiment_run_metrics/experiment_by_target_metrics_response.rb', line 19 def target @target end |
#view ⇒ Object
Returns the value of attribute view.
19 20 21 |
# File 'lib/retab/experiment_run_metrics/experiment_by_target_metrics_response.rb', line 19 def view @view end |