full_state_space: The package for working on full state-space#
This part of the mhn package contains functions to compute and work with MHNs on the full state-space.
The structure of this part of the package is very similar to the original R implementation by Schill et al. (2019):
fisher#
This submodule implements the Fisher information matrix for cMHN and oMHN.
It contains function for computing the FIM in Cython and for calling the CUDA implementation.
Likelihood#
This submodule implements Likelihood.R from the original implementation in Cython.
It contains functions to compute the log-likelihood score and its gradient without state-space restriction as well as functions for matrix-vector multiplications with the transition rate matrix and [I-Q]^(-1). There are also functions to compute the probability distribution represented by an cMHN.
ModelConstruction#
This submodule implements ModelConstruction.R from the original implementation in Cython.
It contains functions to generate random MHNs, build their transition rate matrix Q, the diagonal of Q, and to generate and independence model for a given distribution
PerformanceCriticalCode#
This submodule contains the Cython code equivalent to the original R code in InlineFunctions.R from the original MHN repo as well as some functions to solve linear equations involving [I-Q].
RegularizedOptimization#
This submodule implements RegularizedOptimization.R in Python.
It contains functions to learn an cMHN on the full state-space for a given data distribution and implements the L1 regularization.
UtilityFunctions#
This submodule implements UtilityFunctions.R from the original R implementation in Python.
It contains functions useful for preprocessing training data.