apollo_speedTest {apollo} | R Documentation |
Measures evaluation time of a model
Description
Measures the evaluation time of a model for different number of cores and draws.
Usage
apollo_speedTest(
apollo_beta,
apollo_fixed,
apollo_probabilities,
apollo_inputs,
speedTest_settings = NA
)
Arguments
apollo_beta |
Named numeric vector. Names and values for parameters. |
apollo_fixed |
Character vector. Names (as defined in |
apollo_probabilities |
Function. Returns probabilities of the model to be estimated. Must receive three arguments:
|
apollo_inputs |
List grouping most common inputs. Created by function apollo_validateInputs. |
speedTest_settings |
List. Contains settings for this function. User input is required for all settings except those with a default or marked as optional.
|
Details
This function evaluates the function apollo_probabilities
several times using different number of threads (a.k.a. processor cores),
and draws (if the model uses mixing). It then plots the estimation time for each combination.
Estimation time grows at least linearly with number of draws, while time savings decrease with the number of threads.
This function can help decide what number of draws and cores to use for estimation, though a high number of draws is always
recommended. If the computer will be used for additional activities during estimation, no more than (machine number of cores - 1) should be used.
Using more threads than cores available in the machine will lead to reduce dperformance.
The use of additional cores come at the expense of additional memory usage. If R uses more memory than the physical RAM available,
then significant slow-downs in processing time can be expected. This function can help avoiding such pitfalls.
Value
A matrix with the average time per evaluation for each number of threads and draws combination. A graph is also plotted.