Class: Datarobot::AiApi::Evaluation

Inherits:
Object
  • Object
show all
Defined in:
lib/datarobot/ai_api/evaluation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Evaluation

Takes a response body from the API. Will set all prediction attributes from the response body

Parameters:

  • options (Hash) (defaults to: {})

    A parsed response body



10
11
12
13
14
15
16
17
# File 'lib/datarobot/ai_api/evaluation.rb', line 10

def initialize(options={})
  # one-liner replacement for `stringify_keys`
  options = options.collect{|k,v| [k.to_s, v]}.to_h

  @summary = options.dig("summary")
  @score = options.dig("score")
  @label = options.dig("label")
end

Instance Attribute Details

#labelObject (readonly)

Returns the value of attribute label.



4
5
6
# File 'lib/datarobot/ai_api/evaluation.rb', line 4

def label
  @label
end

#scoreObject (readonly)

Returns the value of attribute score.



4
5
6
# File 'lib/datarobot/ai_api/evaluation.rb', line 4

def score
  @score
end

#summaryObject (readonly)

Returns the value of attribute summary.



4
5
6
# File 'lib/datarobot/ai_api/evaluation.rb', line 4

def summary
  @summary
end