Provides basic generic tools to perform RQMC experiments with a simulation model that implements the MonteCarloModelDouble interface. More...
Static Public Member Functions | |
| static void | simulReplicatesRQMC (MonteCarloModelDouble model, RQMCPointSet prqmc, int m, Tally statReps) |
| Simulate m replications with prqmc and return the m RQMC average observations in statReps. | |
| static void | simulReplicatesRQMC (MonteCarloModelDouble model, PointSet p, PointSetRandomization rand, int m, Tally statReps) |
| Simulate m replications and return the m RQMC average observations in statReps. | |
| static void | simulReplicatesRQMC (MonteCarloModelDouble model, PointSet p, PointSetRandomization rand, int m, Tally statReps, double[][] data) |
| Same as simulReplicatesRQMC, except that all the n observations for each the m replications are saved and returned in a new two-dimensional array data, which is an array of m arrays of size n', i.e., double[m][n],
created inside this method.
| |
| static String | simulReplicatesRQMCDefaultReport (MonteCarloModelDouble model, PointSet p, PointSetRandomization rand, int m, Tally statRQMC) |
| Similar to simulReplicatesRQMC, but also returns a report as a String. | |
| static String | simulReplicatesRQMCDefaultReportCompare (MonteCarloModelDouble model, PointSet p, PointSetRandomization rand, int m, Tally statRQMC, double variancePerRunMC, double secondsPerRunMC) |
| Similar to simulReplicatesRQMCDefaultReport, but this one makes a comparison with another estimator whose variance per run is variancePerRunMC and which took a time secondPerRunMC per run to compute. | |
| static String | makeComparisonExperimentMCvsRQMC (MonteCarloModelDouble model, RandomStream stream, PointSet p, PointSetRandomization rand, int n, int m, Tally statMC, Tally statRQMC) |
| This method first performs a MC experiment to estimate the variance and CPU time per run, then invokes simulReplicatesRQMCDefaultReportCompare and returns a printable report that compares MC with RQMC. | |
| static String | makeComparisonExperimentMCvsRQMC (MonteCarloModelDouble model, RandomStream stream, PointSet p, PointSetRandomization rand, int n, int m) |
| In this version, the statistical collectors are created internally, so they cannot be accessed externally. | |
| static void | simulReplicatesRQMC (MonteCarloModelDoubleArray model, RQMCPointSet prqmc, int m, ListOfTallies< Tally > statRepsList) |
Similar to simulReplicatesRQMC(MonteCarloModelDouble, RQMCPointSet, int, Tally) but for a model of type MonteCarloModelDoubleArray. | |
| static void | simulReplicatesRQMC (MonteCarloModelDoubleArray model, PointSet p, PointSetRandomization rand, int m, ListOfTallies< Tally > statRepsList) |
Same as simulReplicatesRQMC(MonteCarloModelArrayOfDoubles, RQMCPointSet, int, ListOfTallies) but with the point set #p and its randomization #rand specified directly. | |
| static void | simulReplicatesRQMC (MonteCarloModelDoubleArray model, RQMCPointSet prqmc, int m, ListOfTallies< Tally > statRepsList, double[][][] data) |
Same as simulReplicatesRQMC(MonteCarloModelDoubleArray, RQMCPointSet, int, ListOfTallies), except that all the \(n\) observations of dimension \(t\) for each of the \(m\) replications are saved and returned in a new three-dimensional array data<\tt>, which is
an array of size \(m\times n\times t\), i.e., double[m][n][t]. | |
| static void | simulReplicatesRQMC (MonteCarloModelDoubleArray model, PointSet p, PointSetRandomization rand, int m, ListOfTallies< Tally > statRepsList, double[][][] data) |
Same as simulReplicatesRQMC(MonteCarloModelDoubleArray, RQMCPointSet, int, ListOfTallies, double[][][]), but with the point set and the randomization passed separately. | |
| static void | simulReplicatesRQMCCV (MonteCarloModelCV model, RQMCPointSet prqmc, int m, ListOfTalliesWithCV< Tally > statWithCV) |
| Same as simulReplicatesRQMC, except that this one uses control variates. | |
| static void | simulReplicatesRQMCCV (MonteCarloModelCV model, PointSet p, PointSetRandomization rand, int m, ListOfTalliesWithCV< Tally > statWithCV) |
| Same as simulReplicatesRQMCCV above, except that here the point set #p and the randomization #rand are specified directly. | |
| static void | simulFDReplicatesRQMC (MonteCarloModelDouble model1, MonteCarloModelDouble model2, double delta, PointSet p, PointSetRandomization rand, int m, Tally statDiffRQMC) |
| To estimate a derivative via a finite difference. | |
| Static Public Member Functions inherited from umontreal.ssj.mcqmctools.MonteCarloExperiment | |
| static void | simulateRuns (MonteCarloModelDouble model, int n, RandomStream stream, Tally statValue) |
| Performs #n simulation runs of #model using #stream and collects statistics in #statValue. | |
| static void | simulateRuns (MonteCarloModelDoubleArray model, int n, RandomStream stream, ListOfTallies<? extends Tally > statValueList) |
Similar to simulateRuns(MonteCarloModelDouble, int, RandomStream, Tally) but for a model of type MonteCarloModelDoubleArray. | |
| static void | simulateRunsCV (MonteCarloModelCV model, int n, RandomStream stream, ListOfTalliesWithCV< TallyStore > statWithCV) |
| Performs n runs of model using #stream and collects statistics for a model with a vector of control variates. | |
| static void | simulateRunsCV (MonteCarloModelCV model, int n, RandomStream stream, TallyStore statX, TallyStore statC) |
| Performs n runs using stream and collects statistics for a model with a single real-valued control variate C. | |
| static void | simulateRunsCV (MonteCarloModelCV model, int n, RandomStream stream, double[] mean, double[] variance) |
| Performs n runs using #stream and collects statistics for a model with a single real-valued control variate C. | |
| static void | computeMeanVarCV (TallyStore statX, TallyStore statC, double[] mean, double[] variance) |
| Given statistics collected in statX and statC as with simulateRunsCV, this method computes the mean and variance of the estimators with and without the CV and returns them in the two-dimensional vectors mean and variance (mean[0] is the value without CV, mean[1] the value with CV, and similarly for the variance. | |
| static void | simulFDReplicatesCRN (MonteCarloModelDouble model1, MonteCarloModelDouble model2, double delta, int n, RandomStream stream, Tally statDiff) |
| Performs n simulation runs to estimate the difference in performance between model2 and model1, divided by delta, using common random numbers (CRN) across the two models. | |
| static void | simulFDReplicatesIRN (MonteCarloModelDouble model1, MonteCarloModelDouble model2, double delta, int n, RandomStream stream, Tally statDiff) |
| Similar to simulFDReplicatesCRN, but using independent random numbers (IRN) across the two models. | |
| static String | simulateRunsDefaultReportStudent (MonteCarloModelDouble model, int n, RandomStream stream, Tally statValue, double level, int d, Chrono timer) |
| Performs n independent runs using n substreams of #stream, collects statistics in #statValue, and returns a report with a confidence interval of level #level, with d decimal fractional digits of precision for the output, computed via a Student distribution. | |
| static String | simulateRunsDefaultReportStudent (MonteCarloModelDouble model, int n, RandomStream stream, Tally statValue, double level, int d) |
| In this version, there is no need to provide a Chrono; it is created inside. | |
| static String | simulateRunsDefaultReportStudent (MonteCarloModelDouble model, int n, RandomStream stream, Tally statValue, Chrono timer) |
| A short-hand equivalent for simulateRunsDefaultReportStudent (model, n,
stream, statValue, 0.95, 4, timer). | |
| static String | simulateRunsDefaultReportStudent (MonteCarloModelDouble model, int n, RandomStream stream, Tally statValue) |
| A short-hand equivalent for simulateRunsDefaultReportStudent (model, n,
stream, statValue, 0.95, 4). | |
| static String | simulateRunsDefaultReportCV (MonteCarloModelCV model, int n, RandomStream stream, ListOfTalliesWithCV< TallyStore > statWithCV, double level, int d, Chrono timer) |
| Similar to simulateRunsDefaultReport, but this one uses a vector of control variates. | |
| static String | simulateRunsDefaultReportCV (MonteCarloModelCV model, int n, RandomStream stream, ListOfTalliesWithCV< TallyStore > statWithCV, double level, int d) |
| In this one the timer is created internally (and cannot be accessed externally). | |
| static String | simulateRunsDefaultReportCV (MonteCarloModelCV model, int n, RandomStream stream, double[] mean, double[] variance, double level, int d, Chrono timer) |
| This one uses a single real-valued CV, as in simulateRunsCV. | |
Provides basic generic tools to perform RQMC experiments with a simulation model that implements the MonteCarloModelDouble interface.
Definition at line 20 of file RQMCExperiment.java.
|
static |
In this version, the statistical collectors are created internally, so they cannot be accessed externally.
Definition at line 160 of file RQMCExperiment.java.
|
static |
This method first performs a MC experiment to estimate the variance and CPU time per run, then invokes simulReplicatesRQMCDefaultReportCompare and returns a printable report that compares MC with RQMC.
Definition at line 145 of file RQMCExperiment.java.
|
static |
To estimate a derivative via a finite difference.
Definition at line 328 of file RQMCExperiment.java.
|
static |
Simulate m replications and return the m RQMC average observations in statReps.
Here the QMC point set p and its randomization rand are specified directly.
Definition at line 36 of file RQMCExperiment.java.
|
static |
Same as simulReplicatesRQMC, except that all the n observations for each the m replications are saved and returned in a new two-dimensional array data, which is an array of m arrays of size n', i.e., double[m][n], created inside this method.
Each array of size n` is sorted by increasing order. This is useful for density and cdf estimation, or for further processing of the data, for example. */ public static void simulReplicatesRQMC(MonteCarloModelDouble model, RQMCPointSet prqmc, int m, Tally statReps, double[][] data) { simulReplicatesRQMC(model, prqmc.getPointSet(), prqmc.getRandomization(), m, statReps, data); }
/** Here the QMC point set p and its randomization rand are specified directly.
Definition at line 68 of file RQMCExperiment.java.
|
static |
Simulate m replications with prqmc and return the m RQMC average observations in statReps.
These m observations are usually independent if the randomizations used in the RQMC point set prqmc are independent.
Definition at line 27 of file RQMCExperiment.java.
|
static |
Same as simulReplicatesRQMC(MonteCarloModelArrayOfDoubles, RQMCPointSet, int, ListOfTallies) but with the point set #p and its randomization #rand specified directly.
| model | the underlying model which is simulated. |
| p | the point set used. |
| rand | the point set randomization used. |
| m | number of independent replications. |
| statRepsList | statistical container collecting the obtained estimates. |
Definition at line 196 of file RQMCExperiment.java.
|
static |
Same as simulReplicatesRQMC(MonteCarloModelDoubleArray, RQMCPointSet, int, ListOfTallies, double[][][]), but with the point set and the randomization passed separately.
| model | the underlying model which is simulated. |
| p | the QMC-point set used. |
| rand | the point set randomization used. |
| m | number of independent replications. |
| statRepsList | statistical container collecting the obtained estimates. |
| data | array in which all the observations are stored. |
Definition at line 250 of file RQMCExperiment.java.
|
static |
Similar to simulReplicatesRQMC(MonteCarloModelDouble, RQMCPointSet, int, Tally) but for a model of type MonteCarloModelDoubleArray.
Consequently, the statistics are collected in a ListOfTallies. The \(t\)-th element of #statValueList collects the statistics for the \(t\)-th coordinate of the performance vector of #model.
| model | the underlying model which is simulated. |
| prqmc | the RQMC-point set used. |
| m | number of independent replications. |
| statReps | statistical container collecting the obtained estimates. |
Definition at line 180 of file RQMCExperiment.java.
|
static |
Same as simulReplicatesRQMC(MonteCarloModelDoubleArray, RQMCPointSet, int, ListOfTallies), except that all the \(n\) observations of dimension \(t\) for each of the \(m\) replications are saved and returned in a new three-dimensional array data<\tt>, which is
an array of size \(m\times n\times t\), i.e., double[m][n][t].
Note that the \(n\times t\) submatrices of data are not sorted.
| model | the underlying model which is simulated. |
| prqmc | the RQMC-point set used. |
| m | number of independent replications. |
| statRepsList | statistical container collecting the obtained estimates. |
| data | array in which all the observations are stored. |
Definition at line 231 of file RQMCExperiment.java.
|
static |
Same as simulReplicatesRQMCCV above, except that here the point set #p and the randomization #rand are specified directly.
Definition at line 299 of file RQMCExperiment.java.
|
static |
Same as simulReplicatesRQMC, except that this one uses control variates.
It returns in statWithCV the statistics for m observations which corresponds to the m RQMC replications. Each observation is a vector that contains the average over the n simulation runs of the performance value and of the control variates. This implements the replication method for RQMC with CVs, as in Section 5 of Hickernell, Lemieux and Owen (2005). The CV estimates, variances, and covariances can be recovered from statWithCV.
Definition at line 290 of file RQMCExperiment.java.
|
static |
Similar to simulReplicatesRQMC, but also returns a report as a String.
Definition at line 89 of file RQMCExperiment.java.
|
static |
Similar to simulReplicatesRQMCDefaultReport, but this one makes a comparison with another estimator whose variance per run is variancePerRunMC and which took a time secondPerRunMC per run to compute.
These values may come from a previous MC experiment. Returns a report as a String.
Definition at line 110 of file RQMCExperiment.java.