Catalog PyPI
Back to packageRELEASE DETAILS

1.0.1

PyPI

adaptive-stratification

Adaptive Stratification library

Published29 Mar 2022
Direct dependencies2
Transitive dependenciesNot calculated

README

Version 1.0.1 documentation

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.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 2

Native requirements
2 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
scipy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
scipyruntime
numpy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8",
  "evaluation": "NOT_EVALUATED"
}
numpyruntime

Distribution files

2 collected
adaptive_stratification-1.0.1-py3-none-any.whl

bdist_wheel · 13.98 KB · Python py3

Source file
adaptive_stratification-1.0.1.tar.gz

sdist · 13.58 KB · Python source

Source file

Repository

PENDING
skrumscheid/adss

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:08 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:6a32aa27e8be1d70a2fb1cb756adca09d541e618996af7bcc44ff41e5e8a52b4

Other collected versions

View all collected versions →