simulate_sams
- pyoptex.analysis.estimators.sams.simulation.simulate_sams(model, model_size, accept_fn=None, nb_models=10, minprob=0.01, tqdm=True)[source]
Sample models using SAMS algorithm.
Parameters
- model
Model The model to fit such as an OLS or a mixed model.
- model_sizeint
The total size of each overfitted model.
- accept_fnfunc(d)
The acceptance function. Defaults to the
exponential accept.- nb_modelsint
The number of models to sample.
- minprobfloat
The minimum probability before accepting.
- tqdmbool
Whether to use tqdm to track the progress.
Returns
- resultsnp.array(1d)
A numpy array with a special datatype where each element contains two arrays of size model_size (‘model’, np.int_), (‘coeff’, np.float64), and one scalar (‘metric’, np.float64). Results contains nb_models elements.
- model