novae.monitor
novae.monitor.jensen_shannon_divergence(adatas, obs_key, slide_key=None)
Jensen-Shannon divergence (JSD) over all slides
Parameters:
Name | Type | Description | Default |
---|---|---|---|
adatas |
AnnData | list[AnnData]
|
One or a list of AnnData object(s) |
required |
obs_key |
str
|
Key of |
required |
slide_key |
str
|
Optional key of |
None
|
Returns:
Type | Description |
---|---|
float
|
The Jensen-Shannon divergence score for all slides |
Source code in novae/monitor/eval.py
novae.monitor.fide_score(adata, obs_key, n_classes=None)
F1-score of intra-domain edges (FIDE). A high score indicates a great domain continuity.
Note
The F1-score is computed for every class, then all F1-scores are averaged. If some classes
are not predicted, the n_classes
argument allows to pad with zeros before averaging the F1-scores.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
adata |
AnnData
|
An |
required |
obs_key |
str
|
Key of |
required |
n_classes |
int | None
|
Optional number of classes. This can be useful if not all classes are predicted, for a fair comparision. |
None
|
Returns:
Type | Description |
---|---|
float
|
The FIDE score. |
Source code in novae/monitor/eval.py
novae.monitor.mean_fide_score(adatas, obs_key, slide_key=None, n_classes=None)
Mean FIDE score over all slides. A low score indicates a great domain continuity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
adatas |
AnnData | list[AnnData]
|
An |
required |
obs_key |
str
|
Key of |
required |
slide_key |
str
|
Optional key of |
None
|
n_classes |
int | None
|
Optional number of classes. This can be useful if not all classes are predicted, for a fair comparision. |
None
|
Returns:
Type | Description |
---|---|
float
|
The FIDE score averaged for all slides. |
Source code in novae/monitor/eval.py
novae.monitor.svg_score(adata, obs_key, n_top_genes=3, n_classes=None)
Average score of the top differentially expressed genes for each domain.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
adata |
AnnData
|
An |
required |
obs_key |
str
|
Key of |
required |
n_top_genes |
int
|
Number of genes per domain to consider. |
3
|
Returns:
Type | Description |
---|---|
float
|
The average SVG score. |
Source code in novae/monitor/eval.py
novae.monitor.mean_svg_score(adata, obs_key, slide_key=None, n_top_genes=3, n_classes=None)
Mean SVG score over all slides. A high score indicates better domain-specific genes, or spatial variable genes.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
adata |
AnnData | list[AnnData]
|
An |
required |
obs_key |
str
|
Key of |
required |
slide_key |
str
|
Optional key of |
None
|
n_top_genes |
int
|
Number of genes per domain to consider. |
3
|
Returns:
Type | Description |
---|---|
float
|
The mean SVG score accross all slides. |