Class: NexosisApi::ImpactMetric

Inherits:
Object
  • Object
show all
Defined in:
lib/nexosis_api/impact_metric.rb

Overview

Class to parse the metric results of an impact analysis

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(metric_hash) ⇒ ImpactMetric

Returns a new instance of ImpactMetric.



4
5
6
7
8
# File 'lib/nexosis_api/impact_metric.rb', line 4

def initialize(metric_hash)
  metric_hash.each do |k, v|
    instance_variable_set("@#{k}", v) unless v.nil?
  end
end

Instance Attribute Details

#absoluteEffectFloat

Total absolute effect of the event on the dataset.

Returns:

  • (Float)


16
17
18
# File 'lib/nexosis_api/impact_metric.rb', line 16

def absoluteEffect
  @absoluteEffect
end

#pValueFloat

Statistical value used to determine the significance of the impact.

Returns:

  • (Float)


12
13
14
# File 'lib/nexosis_api/impact_metric.rb', line 12

def pValue
  @pValue
end

#relativeEffectFloat

Percentage impact of the event on the dataset.

Returns:

  • (Float)


20
21
22
# File 'lib/nexosis_api/impact_metric.rb', line 20

def relativeEffect
  @relativeEffect
end