Drawing a value from a normal distribution in F #

How do I get a random value obtained from a given normal distribution in F #?

I need something similar to Python x = numpy.random.normal (mean, standard_deviation), but in F #.

+4
source share
1 answer

You can, for example, use the Math.NET Numerics library.

open MathNet.Numerics.Distributions

let normalDist = new Normal(mean, stddev)
normalDist.Sample()
+5
source

All Articles