Settings#

Settings for the PhaseGen application.

class Settings[source]#

Bases: object

flatten_block_counting: bool = True#

Whether to flatten the block-counting state space when possible. In certain cases, this can be achieved by computing block probabilities and adjusting the rewards of the lineage-counting state space accordingly. This can substantially speed up computations.

use_pbar: bool = False#

Whether to show a progress bar for certain operations such as state space generation.

parallelize: bool = False#

Whether to parallelize phase-type computations across multiple CPU cores. This may improve performance in some cases, but can also be detrimental due to inter-process data copying and can lead to hanging processes.

regularize: bool = True#

Whether to regularize the intensity matrix for numerical stability.

cache_epochs: bool = True#

Whether to cache the rate matrix for different epochs which increases performance.

use_numba: bool = True#

Whether to use the numba-accelerated state-space construction when numba is available. Set to False to force the pure-Python construction path.

expm_action_min_dim: int = 1500#

Van Loan matrix dimension ((k + 1) * n_states) at or above which moments are computed via the sparse matrix-exponential action (Krylov/Taylor) instead of forming the dense propagator. The action exploits the sparsity of the rate matrix and is much faster for large state spaces, but slower for small ones. Set to a very large value to always use the dense path, or to 0 to always use the action.

static set_pbar(enabled: bool = True)[source]#

Context manager to temporarily enable or disable the progress bar.