Creating Distributions Using Machine Learning

This method of creating a distribution is available from Simul8 2022, allowing you to use machine learning algorithms to create a distribution for use in your simulation. Creating a distribution using ML is not available in Simul8 Online.


To create a distribution, navigate to the ‘Data and Rules’ tab and select ‘Create Distribution’. Next, give your distribution a name then select the option ‘Machine Learning’ and click ‘Next’.

Simul8 Machine Learning Distributions

Note: your Machine Learning algorithm must return a number.

Setup

To create a distribution using Machine Learning algorithms, you can either use R or Python.


If using R, the ML algorithm must be part of a function and the function saved as an .RDS file. The function must also be able to read in a dataframe, with the parameter name in column 1 and the parameter value in column 2.


If using Python, the algorithm must be saved in a .py file and the function must be called prediction. It also must take in two lists as the arguments.


Go to Data and Rules > Distributions > Machine Learning > Next. By default, Simul8 will use R. If you want to use Python, click on Advanced Settings.

Simul8 Machine Learning Distribution Settings

In the Setup tab, click on Browse and select the file which contains your algorithm.

Simul8 Machine Learning Distribution Setup

This distribution will now be available to select wherever you need to set a distribution.

Simul8 Machine Learning Distributions Example

See Also