Python PolytopeWalk Utils
- polytopewalk.sparseFullWalkRun(niter: int, A: scipy.sparse.csc_matrix[numpy.float64], b: numpy.ndarray[numpy.float64[m, 1]], k: int, walk: SparseRandomWalk, fr: FacialReduction, sc: SparseCenter, burnin: int = 0, thin: int = 1, seed: int = -1) numpy.ndarray[numpy.float64[m, n]]
Sparse Central Function. Starts with polytope in sparse, constrained formulation. Computes facial reduction to preprocess polytope and uses the reduced constrained polytope to run MCMC sampler before converting it back into original formulation.
- Parameters:
niter (int) – Number of iterations.
A (numpy.ndarray) – Constraint matrix.
b (numpy.ndarray) – Constraint vector.
k (int) – Dimensionality of the polytope.
walk (RandomWalk) – Random walk instance.
fr (FacialReduction) – Facial reduction object.
sc (SparseCenter) – Sparse center object.
burnin (int, optional) – Number of burn-in steps (default is 0).
thin (int, optional) – Number of samples to thin (default is 1).
seed (int, optional) – Seed number for reproducibility (default is -1 meaning no fixed setting).
- Returns:
List of sampled points.
- Return type:
numpy.ndarray
- polytopewalk.denseFullWalkRun(niter: int, A: scipy.sparse.csc_matrix[numpy.float64], b: numpy.ndarray[numpy.float64[m, 1]], k: int, walk: RandomWalk, fr: FacialReduction, dc: DenseCenter, burnin: int = 0, thin: int = 1, seed: int = -1) numpy.ndarray[numpy.float64[m, n]]
Dense Central Function. Starts with polytope in sparse, constrained formulation. Computes facial reduction to preprocess polytope and uses the dense, full-dimensional polytope to run MCMC sampler before converting it back into original formulation.
- Parameters:
niter (int) – Number of iterations.
A (numpy.ndarray) – Constraint matrix.
b (numpy.ndarray) – Constraint vector.
k (int) – Dimensionality of the polytope.
walk (RandomWalk) – Random walk instance.
fr (FacialReduction) – Facial reduction object.
dc (DenseCenter) – Dense center object.
burnin (int, optional) – Number of burn-in steps (default is 0).
thin (int, optional) – Number of samples to thin (default is 1).
seed (int, optional) – Seed number for reproducibility (default is -1 meaning no fixed setting).
- Returns:
List of sampled points.
- Return type:
numpy.ndarray