class Datarobot::AiApi::Prediction

Attributes

data[R]
prediction[R]
row_id[R]

Public Class Methods

new(options={}) click to toggle source

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

@param [Hash] options A parsed response body

# File lib/datarobot/ai_api/prediction.rb, line 10
def initialize(options={})
  # one-liner replacement for `stringify_keys`
  options = options.collect{|k,v| [k.to_s, v]}.to_h

  @prediction = options.dig("prediction")
  @row_id = options.dig("rowId")
  @data = options.dig("data")
end