7.1.1.2.1.3. pta.sampling.primitives
Abstract base class for sampling over the flux polytope.
7.1.1.2.1.3.1. Module Contents
- class pta.sampling.primitives.FluxSpaceSamplingModel(polytope: PolyRound.api.Polytope, reaction_ids: List[str])[source]
Bases:
pta.sampling.commons.SamplerInterfaceObject holding the information necessary to sample a flux space.
- Parameters:
polytope (Polytope) – Polytope object describing the flux space.
reaction_ids (List[str]) – Identifiers of the reactions in the flux space.
- property to_fluxes_transform: Tuple[numpy.array, numpy.array][source]
Gets the transform from a point in the model to a point in the flux space.
- to_fluxes(value: numpy.array) numpy.array[source]
Transform a point or matrix from the model to the flux space.
- Parameters:
value (np.array) – Input values.
- Returns:
The corresponding fluxes.
- Return type:
np.array
- get_initial_points(num_points: int) numpy.array[source]
Gets initial points for sampling fluxes.
- Parameters:
model (UniformSamplingModel) – The model to sample.
num_points (int) – Number of initial points to generate.
- Returns:
Array containing the initial points.
- Return type:
np.array