class Savanna::Outliers::Core
Attributes
array[R]
method[RW]
Public Class Methods
new(input_array, method = :grubbs)
click to toggle source
# File lib/savanna-outliers/core.rb, line 17 def initialize(input_array, method = :grubbs) @array = input_array.extend(DescriptiveStatistics) @method = method end
Public Instance Methods
max_outlier?()
click to toggle source
# File lib/savanna-outliers/core.rb, line 29 def max_outlier? case when method == :grubbs then max_outlier_grubbs? when method == :chauvenets then max_outlier_chauvenets? end end
min_outlier?()
click to toggle source
# File lib/savanna-outliers/core.rb, line 36 def min_outlier? case when method == :grubbs then min_outlier_grubbs? when method == :chauvenets then min_outlier_chauvenets? end end
outliers?()
click to toggle source
# File lib/savanna-outliers/core.rb, line 22 def outliers? case when method == :grubbs then outliers_grubbs? when method == :chauvenets then outliers_chauvenets? end end
Private Instance Methods
indexed_array()
click to toggle source
# File lib/savanna-outliers/core.rb, line 45 def indexed_array @indexed_array ||= array.each_with_index end