Repository that provides a custom class and functions to use the CARPool method from Chartier et al. (2020). The 'examples/' repository contains scripts allowing to reproduce results from the paper.
- Python >= 3.3
- numpy
- scipy
- scikits-bootsrap : Used to compute Bias-corrected and Accelerated (BCA) bootstrap confidence intervals.
- tqdm
In terminal, go to the project folder and run
cd pyCARPool/
python setup.py install
First, it is advised to import the module as below for simplicity:
from pyCARPool import CARPool, confidenceInt, CARPoolSamples, CARPoolEstimator
The goal is to compute an unbiased estimate of a parameter vector with much lower variance than the samples mean of costly simulations. For that, we use surrogate samples paired with the simulation ones. Beforehand, order your data so that you have two numpy arrays of shape (P,N), with P the dimension of the samples (ex: number of Power spectrum bins) and N the number of realizations, ordered in a way that each column of the surrogate and simulation data correspond to the same random seed. You also need to provide an estimate of the surrogate mean as an array of shape (P,) from an other set of surrogate ralizations.
Put examples of functions and class usage here