x3cflux.run_non_uniform_sampling
- class x3cflux.run_non_uniform_sampling(simulator, num_samples: int, starting_point: ~numpy.ndarray = None, bounds: ~typing.Dict[str, ~typing.Tuple[float, float]] = None, num_chains: int = 1, proposal: ~hopsy.core.PyProposal = <class 'hopsy.core.GaussianCoordinateHitAndRunProposal'>, random_seed: int = 42, **kwargs)
Run non-uniform sampling to estimate the posterior distribution induced by the given labeling data. 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
num_samples – Number of samples to generate
starting_point – Point from where to start sampling
bounds – Parameter boundary constraints
num_chains – Number of Markov chains to run
proposal – Proposal to use for Metropolis-Hastings
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 tensor (C, N, M), where C, N, M are the numbers of chains, parameters and samples