Evidlo/expsweep: Sweep parameters of a numerical experiment and collect results into a table
github.com·5h
Preview
Report Post

expsweep - Numerical Experiment Sweeper

Runs Monte Carlo experiments on a function with swept-parameters and collects results into a table.

Features

  • automatically parallelizes experiment and displays a progress bar
  • results are returned as a Pandas table which can be easily plotted in seaborn

Quickstart

pip install expsweep

Basic Example - two simultaneous experiments with a single variable sweep

import expsweep

# Function to run Monte Carlo experiment on.
# Should return a dictionary containing experiment results.
def exp(x):
return {
'experiment1': np.random.normal(loc=x, scale=x),
'experiment2': np.random.normal(loc=3 * x, scale=x)
}


# Run Monte Carlo experiment on exp() function.
# Sweep parameter x (with 20 repetitions for each x) and collect resu...

Similar Posts

Loading similar posts...