> ## Documentation Index
> Fetch the complete documentation index at: https://demo.agenticlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# __init__.py

## High-level description

This file serves as the top-level module for the cassiopeia critique package. It imports and exposes two key functions, `robinson_foulds` and `triplets_correct`, from the `compare` module, which are used for comparing phylogenetic trees.

## Symbols

### `robinson_foulds`

#### Description

This function computes the Robinson-Foulds distance between two phylogenetic trees. It is imported from the `compare` module.

#### Inputs

| Name  | Type           | Description                |
| :---- | :------------- | :------------------------- |
| tree1 | CassiopeiaTree | The first tree to compare  |
| tree2 | CassiopeiaTree | The second tree to compare |

#### Outputs

| Name    | Type  | Description                                                     |
| :------ | :---- | :-------------------------------------------------------------- |
| rf      | float | The Robinson-Foulds distance between the two trees              |
| rf\_max | float | The maximum possible Robinson-Foulds distance for normalization |

### `triplets_correct`

#### Description

This function calculates the triplets correct accuracy between two phylogenetic trees. It samples triplets at different depths and compares their structure between the two trees.

#### Inputs

| Name                     | Type           | Description                                                             |
| :----------------------- | :------------- | :---------------------------------------------------------------------- |
| tree1                    | CassiopeiaTree | The first tree to compare                                               |
| tree2                    | CassiopeiaTree | The second tree to compare                                              |
| number\_of\_trials       | int            | Number of triplets to sample at each depth (default: 1000)              |
| min\_triplets\_at\_depth | int            | Minimum number of triplets needed at a depth for inclusion (default: 1) |

#### Outputs

| Name                          | Type              | Description                                              |
| :---------------------------- | :---------------- | :------------------------------------------------------- |
| all\_triplets\_correct        | Dict\[int, float] | Total triplets correct at each depth                     |
| resolvable\_triplets\_correct | Dict\[int, float] | Triplets correct for resolvable triplets at each depth   |
| unresolved\_triplets\_correct | Dict\[int, float] | Triplets correct for unresolvable triplets at each depth |
| proportion\_resolvable        | Dict\[int, float] | Proportion of unresolvable triplets per depth            |

## Dependencies

| Dependency                  | Purpose                                              |
| :-------------------------- | :--------------------------------------------------- |
| cassiopeia.critique.compare | Source of the imported functions for tree comparison |

This file acts as an interface to the tree comparison functionality in the cassiopeia critique module, making it easier for users to access these functions without having to import from deeper within the package structure.
