Class: NexosisApi::TimeseriesOutliers
- Inherits:
-
SessionResponse
- Object
- Session
- SessionResponse
- NexosisApi::TimeseriesOutliers
- Defined in:
- lib/nexosis_api/timeseries_outliers.rb
Overview
When Nexosis runs a time-series forecast, a smoothed dataset is created in addition to the original. These outlier values represent those which were modified in that smoothed dataset.
Class to hold the parse results of an outlier response
Instance Attribute Summary collapse
-
#data ⇒ NexosisApi::PagedArray NexosisApi::Outlier
readonly
The set of outlier values found in the given sessions dataset.
Attributes inherited from SessionResponse
#datasets_allotted, #datasets_current, #predictions_allotted, #predictions_current, #sessions_allotted, #sessions_current
Attributes inherited from Session
#column_metadata, #datasource_name, #end_date, #extra_parameters, #links, #messages, #model_id, #name, #prediction_domain, #prediction_intervals, #requested_date, #result_interval, #session_id, #start_date, #status, #status_history, #supports_feature_importance, #target_column, #type
Instance Method Summary collapse
-
#initialize(outlier_hash) ⇒ TimeseriesOutliers
constructor
A new instance of TimeseriesOutliers.
Constructor Details
#initialize(outlier_hash) ⇒ TimeseriesOutliers
Returns a new instance of TimeseriesOutliers.
6 7 8 9 10 |
# File 'lib/nexosis_api/timeseries_outliers.rb', line 6 def initialize(outlier_hash) data = outlier_hash.fetch(:data) { |k| outlier_hash.fetch(k.to_s) } @data = NexosisApi::PagedArray.new(outlier_hash, data.map { |v| NexosisApi::Outlier.new(v) }) super(outlier_hash.reject { |k, _v| k.to_s.casecmp('data').zero? }) end |
Instance Attribute Details
#data ⇒ NexosisApi::PagedArray NexosisApi::Outlier (readonly)
The set of outlier values found in the given sessions dataset
14 15 16 |
# File 'lib/nexosis_api/timeseries_outliers.rb', line 14 def data @data end |