class Rust::Correlation::Result
Attributes
correlation[RW]
estimate[RW]
exact[RW]
name[RW]
pvalue[RW]
statistics[RW]
Public Class Methods
new()
click to toggle source
# File lib/rust-basics.rb, line 94 def initialize @statistics = {} @exact = true end
Public Instance Methods
[](name)
click to toggle source
# File lib/rust-basics.rb, line 99 def [](name) return @statistics[name.to_sym] end
[]=(name, value)
click to toggle source
# File lib/rust-basics.rb, line 103 def []=(name, value) @statistics[name.to_sym] = value end
to_s()
click to toggle source
# File lib/rust-basics.rb, line 107 def to_s return "#{name}. Correlation = #{correlation}, P-value = #{pvalue} " + (!@exact ? "P-value is not exact. " : "") + "#{ statistics.map { |k, v| k.to_s + " -> " + v.to_s }.join(", ") }." end