- changed status to open
Estimate probability distribution by Monte Carlo method
Most results provided by Lea require the calculation of exact probability distributions from an expression mixing several given probability distributions. For example,
leaRes = f(lea1,g(Lea2,lea3))
This is performed through combinatorial approach (cartesian product lea1 x lea2 x lea3), which can become impracticable when the number/size of distributions increase. Another approach should be to estimate the resulting probability distribution through a Monte Carlo method : counting the frequencies of a random sample
f(lea1.random(),g(lea2.random(),lea3.random())
shall provide an estimation of the resulting distribution, which become more and more accurate, as the size of the sample grows. Although such approach can be programmed by the user, we want that this is automated from the given Lea instance definition, through a new randomMC method:
leaRes = f(lea1,g(Lea2,lea3))
sampleMC = leaRes.randomMC(1000)
estimatedLeaRes = Lea.fromSeq(sampleMC)
Note that the current random(n) method is NOT adequate because it first calculates the exact distribution, which we want to avoid.
Comments (10)
-
reporter -
reporter - edited description
-
reporter - edited description
-
reporter - edited description
-
reporter Fix bugs in Blea/Ilea ._genOneRandomMC method in (refs
#16)→ <<cset 82235f4adb1b>>
-
reporter - changed status to resolved
Ready for Lea 2.2.
-
reporter Minor optimization: Blea._condClea becomes lazy (refs
#16)→ <<cset f9bc4b0164cf>>
-
reporter - changed status to closed
-
reporter Fix bugs in Blea/Ilea ._genOneRandomMC method in (refs
#16)→ <<cset 49a33de20840>>
-
reporter Minor optimization: Blea._condClea becomes lazy (refs
#16)→ <<cset 95c8afae87e0>>
- Log in to comment