module SHAInet::RandomNormal

Extended Modules

Defined in:

shainet/math/random_normal.cr

Instance Method Summary

Instance Method Detail

def metropolis(n : Int32 = 1, mu : Float64 = 0.0, sigma : Float64 = 1.0) #

Sampling n points from a normal distribution with mu & sigma, using the Metropolis-Hastings algorithm


[View source]
def pdf(x : Float64, mu : Float64, sigma : Float64) #

Normal probability density function calculation


[View source]
def sample(n : Int32 = 1, mu : Float64 = 0.0, sigma : Float64 = 1.0) #

[View source]