treeflow.model package
- class treeflow.model.PhyloModel(model_dict: Dict[str, str | Dict[str, object]])
Bases:
objectClass to represent the configuration of a basic phylogenetic model
- classmethod check_model_dict(model_dict: Dict[str, str | Dict[str, object]])
- all_params() Dict[str, object]
- free_params() Dict[str, Dict[str, object]]
- relaxed_clock() bool
- treeflow.model.phylo_model_to_joint_distribution(model: PhyloModel, initial_tree: TensorflowRootedTree, initial_alignment: Alignment, pattern_counts: Tensor | None = None, use_native: str | bool = 'auto', unroll: str | bool = 'auto', include_likelihood: bool = True) JointDistributionCoroutine
Build the joint distribution for a phylogenetic model.
- Parameters:
use_native – Forwarded to the sequence likelihood (
LeafCTMC) to select the native C++ tree-likelihood op (True), the pure-TensorFlow implementation (False), or automatic selection ("auto").include_likelihood – When
Falsethe sequence (alignment) likelihood term is omitted, so the resulting distribution is the prior over all latent parameters. This is useful for profiling the prior and likelihood contributions to the target density separately.