class NexosisApi::PredictResponse
Class to hold the parsed response of a prediction request @since 1.3.0
Attributes
messages[RW]
A list of warning message optionally returned from prediction run @return [Array]
model_id[R]
The unique identifier for the model used to create these predictions @return [String]
predictions[RW]
The feature data along with predicted target value @return [Array of Hash] each row of data as a hash in an array of values @note The result data includes an echo of the data sent to the predict request along with the target column containing the values predicted. [
{ "feature1": 23.33, "target": 2.59 }, { "feature1": 15.82, "target": 1.75 }
]
Public Class Methods
new(model_id, response_hash)
click to toggle source
# File lib/nexosis_api/predict_response.rb, line 5 def initialize(model_id, response_hash) @model_id = model_id @predictions = response_hash['data'] @message = response_hash['messages'] end