x3cflux.run_uniform_sampling
- class x3cflux.run_uniform_sampling(simulator, num_samples: int, bounds: Dict[str, Tuple[float, float]] = None, rounding: bool = True, random_seed: int = 42, **kwargs)
Run uniform sampling of the Polytope induces by the metabolic mode. Markov Chain Monte Carlo (MCMC) as implemented in the Polytope sampling toolbox hopsy is used and can be configured by passing appropriate kwargs. See Paul, R. et al. (2024), https://doi.org/10.1093/bioinformatics/btae430.
- Parameters:
simulator – Labeling simulator for drawing inequality system
num_samples – Number of samples to generate
bounds – Parameter boundary constraints
rounding – Rounds the polytope before sampling. Rounding significantly increases the efficiency of sampling, but might take some time for large models.
random_seed – Random seed to initialize the Markov chain
kwargs – Pass hopsy options as kwargs. See https://modsim.github.io/hopsy/generated/hopsy.sample.html.
- Returns:
Generated samples as (N, M) matrix, where N and M are the numbers of parameters and samples