Class: Datarobot::AiApi::Evaluation
- Inherits:
-
Object
- Object
- Datarobot::AiApi::Evaluation
- Defined in:
- lib/datarobot/ai_api/evaluation.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
-
#summary ⇒ Object
readonly
Returns the value of attribute summary.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Evaluation
constructor
Takes a response body from the API.
Constructor Details
#initialize(options = {}) ⇒ Evaluation
Takes a response body from the API. Will set all prediction attributes from the response body
10 11 12 13 14 15 16 17 |
# File 'lib/datarobot/ai_api/evaluation.rb', line 10 def initialize(={}) # one-liner replacement for `stringify_keys` = .collect{|k,v| [k.to_s, v]}.to_h @summary = .dig("summary") @score = .dig("score") @label = .dig("label") end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
4 5 6 |
# File 'lib/datarobot/ai_api/evaluation.rb', line 4 def label @label end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
4 5 6 |
# File 'lib/datarobot/ai_api/evaluation.rb', line 4 def score @score end |
#summary ⇒ Object (readonly)
Returns the value of attribute summary.
4 5 6 |
# File 'lib/datarobot/ai_api/evaluation.rb', line 4 def summary @summary end |