Module: ERV::GaussianMixtureHelper
- Defined in:
- lib/sisfc/configuration.rb
Class Method Summary collapse
Class Method Details
.RawParametersToMixtureArgs(*args) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/sisfc/configuration.rb', line 12 def self.RawParametersToMixtureArgs(*args) raise ArgumentError, "Arguments must be a multiple of 3!" if (args.count % 3) != 0 args.each_slice(3).map do |(a,b,c)| { distribution: :gaussian, weight: a * c, args: { mean: b, sd: c } } end end |