View Source Chi2fit.MonteCarlo (Chi-SquaredFit v2.0.2)
Link to this section Summary
Functions
Forecasts how many time periods are needed to complete size
items
Returns a function for forecasting the duration to complete a number of items.
Returns a function for forecasting the number of completed items in a number periods.
Basic Monte Carlo simulation to repeatedly run a simulation multiple times.
Link to this section Functions
@spec forecast( fun :: (() -> non_neg_integer()), size :: pos_integer(), tries :: pos_integer(), update :: (() -> number()) ) :: number()
Forecasts how many time periods are needed to complete size
items
Related functions: forecast_duration/2
and forecast_items/2
.
@spec forecast_duration(data :: [number()] | (() -> number()), size :: pos_integer()) :: (() -> number())
Returns a function for forecasting the duration to complete a number of items.
This function is a wrapper for forecast/4
.
arguments
Arguments
`data` - either a data set to base the forecasting on, or a function that returns (random) numbers
`size` - the number of items to complete
@spec forecast_items(data :: [number()] | (() -> number()), periods :: pos_integer()) :: (() -> number())
Returns a function for forecasting the number of completed items in a number periods.
This function is a wrapper for forecast/4
.
arguments
Arguments
`data` - either a data set to base the forecasting on, or a function that returns (random) numbers
`periods` - the number of periods to forecast the number of completed items for
@spec mc( iterations :: pos_integer(), fun :: (pos_integer() -> float()), options :: Keyword.t() ) :: {avg :: float(), sd :: float(), tries :: [float()]} | {avg :: float(), sd :: float()}
Basic Monte Carlo simulation to repeatedly run a simulation multiple times.
options
Options
`:collect_all?` - If true, collects data from each individual simulation run and returns this an the third element of the result tuple