Monte Carlos Simulations

Hi,

I’m new to KNIME and I would like to know what’s the best way, if possible, to performe Monte Carlo Simulations using KNIME. Trough R? There’s a natural KNIME language I can use?

Thanks in advance and sorry for this newbie question.

Rick

I would say, that writing your own node is the best solution. I’m not sure though, what R offers in that direction.

Forgot to say, that Java is the natural KNIME language :wink:

Hello Rick,
I did a sample workflow with a kind of Monte Carlo setup. You can check it here, although it requires HiTS to load it (if I remember well the generation of a random distribution does not require).
gabor

Wow! A node for monte carlo simulations would be very helpful!

3 Likes

@ScottF @Corey do you know if this exists yet? I could use it on a new optimization problem…

Currently I don’t believe so, at least not in a self-contained node or component.

There is a blog post by one of our partners on methods for implementing Monte Carlo manually:

And associated workflow on the Hub:

3 Likes

good evening guys
I just downloaded the pi approx wf…it runs ok but at the end the lineplot is approaching arround 9.5 instead of pi… I compared the wf with the doc and there are no evident errors… can you pls shed some light to this?

We’d have to ask @pwisneskey for sure, but after a very quick glance at the workflow, maybe he’s missing a sqrt() in his Math Formula nodes?

1 Like

I am happy to take a look at it. There should be (and was) a square root at the end. I’ll let you know what I find shortly. Thank you!

1 Like

Scot was completely correct - the sqrt() was missing from the formulas at the end of the version on the KNIME hub. My local copy was correct so I have pushed the corrected version up to the KNIME hub. Sorry for the trouble and thank you for reporting it.

3 Likes

thnx guys! looking forward to give it a try!

Monte Carlo is a very popular solving approach and I hope that one day KNIME comes up with an elegant solution for this…

1 Like

Hi Paul and Scott

I was running the new wf and it got indeed a bit better but still not doing an approx on pi…
did you run the wf yourself and checked the line plot output?
here is what it looks like now on my machine.