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.SamplerInterface

Object 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 G: numpy.array[source]

Gets the left-hand side of the constraints of the flux space.

property h: numpy.array[source]

Gets the right-hand side of the constraints of 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.

property reaction_ids[source]

Gets the IDs of the reactions in the model.

property dimensionality: int[source]

Gets the dimensionality of 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:
Returns:

Array containing the initial points.

Return type:

np.array