Adaptive Stratification library
Project description
Adaptive Stratification
This package provides an implementation of the adaptive stratification sampling method to estimate quantities of interest of the form Q = E(f(Y)), where the random vector Y follows a d-dimensional uniform distribution on the unit-cube and f is a given function.
Example: Using the Sampler
# Import the module containing the sampling routines
from stratification import AdaptiveStratification
# Create a sampler for function func
sampler = AdaptiveStratification(func, d, N_max, N_new_per_stratum, alpha, type='hyperrect')
# Solve (return a tuple)
result = sampler.solve()
Input arguments:
func
: implementation of given function of interest that defines the quantity of interest. It needs to be callable, accepting one m-times-n-dimensional numpy array as input and returns a m-dimensional numpy array;d
: dimension of the stochastic domain;N_max
: number of total samples to be used;N_new_per_stratum
: targeted average number of samples per stratum, controlling the adaptation;alpha
: number between zero and one, defining the hybrid allocation rule;type
: type of tessellation procedure, i.e., via hyper-rectangles (type='hyperrect'
) or simplices (type='simplex'
)
More Information
See the Github repository for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for adaptive_stratification-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdc01a4e04d045b002510ba391f293dcc45618bde4d027ac1ef348f1e0c6e988 |
|
MD5 | 04e21f5d7bee717d2ec2c788e4dcd001 |
|
BLAKE2b-256 | 20b0328411ec1909cc0e97b3b9f014b0ce46faa0a8f12da217fde001ce478e9e |
Close
Hashes for adaptive_stratification-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4a82d0e699302fa62b1b0e5c138bd06ca404094f11a902327f2c1ba1095df1e |
|
MD5 | b06d688f301086a0ff5b54c7b892ffbf |
|
BLAKE2b-256 | ced2667f938b6552fa5f36820b619ae1da9879a638073f864270fb15fd84b8cc |