comparative-embedding-visualization
A Jupyter widget for comparing two embeddings with shared labels by their confusion, neighborhoods, and size.
https://github.com/ozettetech/comparative-embedding-visualization
Science Score: 57.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 7 DOI reference(s) in README -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.6%) to scientific vocabulary
Keywords
Repository
A Jupyter widget for comparing two embeddings with shared labels by their confusion, neighborhoods, and size.
Basic Info
Statistics
- Stars: 45
- Watchers: 5
- Forks: 0
- Open Issues: 3
- Releases: 1
Topics
Metadata Files
README.md
Comparative Embedding Visualization with cev
cev is an interactive Jupyter widget for comparing a pair of 2D embeddings with shared labels.Its novel metric allows to surface differences in label confusion, neighborhood composition, and label size.
The embeddings were generated with [Greene et al.'s (2021) annotation transformation](https://github.com/flekschas-ozette/ismb-biovis-2022) and [UMAP](https://github.com/lmcinnes/umap).
`cev` is implemented with [anywidget](https://anywidget.dev) and builds upon [jupyter-scatter](https://github.com/flekschas/jupyter-scatter/).
Quick Start
The cev package has a cli to quickly try out a demo of comparison widget in JupyterLab. It requires uv to be installed.
sh
uvx --python 3.11 cev demo # Downloads datasets and launches Jupyter Lab
Installation
Warning:
cevis new and under active development. It is not yet ready for production and APIs are subject to change.
sh
pip install cev
Getting Started
```py import pandas as pd from cev.widgets import Embedding, EmbeddingComparisonWidget
umapembedding = Embedding.fromozette(df=pd.readparquet("../data/mair-2022-tissue-138-umap.pq")) ozetteembedding = Embedding.fromozette(df=pd.readparquet("../data/mair-2022-tissue-138-ozette.pq"))
umapvsozette = EmbeddingComparisonWidget( umapembedding, ozetteembedding, titles=["Standard UMAP", "Annotation-Transformed UMAP"], metric="confusion", selection="synced", autozoom=True, rowheight=320, ) umapvsozette ```
See notebooks/getting-started.ipynb for the complete example.
Development
We use uv for development.
sh
uv run jupyter lab
Commands Cheatsheet
| Command | Action |
| :--------------------- | :------------------------------------------------------------------ |
| uv run ruff format | Format the source code. |
| uv run ruff check | Check the source code for formatting issues. |
| uv run pytest | Run unit tests with pytest in base environment. |
Release
releases are triggered via tagged commits
git tag -a vX.X.X -m "vX.X.X"
git push --follow-tags
License
cev is distributed under the terms of the Apache License 2.0.
Citation
If you use cev in your research, please cite the following preprint:
bibtex
@article{manz2024general,
title = {A General Framework for Comparing Embedding Visualizations Across Class-Label Hierarchies},
author = {Trevor Manz and Fritz Lekschas and Evan Greene and Greg Finak and Nils Gehlenborg},
url = {https://doi.org/10.1109/TVCG.2024.3456370},
doi = {10.1109/TVCG.2024.3456370},
journal = {IEEE Transactions on Visualization and Computer Graphics},
series = {VIS ’24},
publisher = {IEEE},
year = {2024},
month = {9},
pages = {1-11}
}
Owner
- Name: Ozette Technologies
- Login: OzetteTech
- Kind: organization
- Email: contact@ozette.com
- Location: Seattle
- Website: https://www.ozette.com
- Twitter: OzetteAI
- Repositories: 2
- Profile: https://github.com/OzetteTech
Citation (CITATION.cff)
cff-version: "1.2.0"
title: "A General Framework for Comparing Embedding Visualizations Across Class-Label Hierarchies"
authors:
- given-names: "Trevor"
family-names: "Manz"
orcid: "https://orcid.org/0000-0001-7694-5164"
affiliation: "Harvard Medical School"
- given-names: "Fritz"
family-names: "Lekschas"
orcid: "https://orcid.org/0000-0001-8432-4835"
affiliation: "Ozette Technologies"
- given-names: "Evan"
family-names: "Greene"
affiliation: "Ozette Technologies"
- given-names: "Greg"
family-names: "Finak"
orcid: "https://orcid.org/0000-0003-4341-9090"
affiliation: "Ozette Technologies"
- given-names: "Nils"
family-names: "Gehlenborg"
affiliation: "Harvard Medical School"
orcid: "https://orcid.org/0000-0003-0327-8297"
url: "https://github.com/OzetteTech/comparative-embedding-visualization"
message: If you use this software, please cite our article in the
IEEE Transactions on Visualization and Computer Graphics.
preferred-citation:
type: article
title: "A General Framework for Comparing Embedding Visualizations Across Class-Label Hierarchies"
authors:
- given-names: "Trevor"
family-names: "Manz"
orcid: "https://orcid.org/0000-0001-7694-5164"
affiliation: "Harvard Medical School"
- given-names: "Fritz"
family-names: "Lekschas"
orcid: "https://orcid.org/0000-0001-8432-4835"
affiliation: "Ozette Technologies"
- given-names: "Evan"
family-names: "Greene"
affiliation: "Ozette Technologies"
- given-names: "Greg"
family-names: "Finak"
orcid: "https://orcid.org/0000-0003-4341-9090"
affiliation: "Ozette Technologies"
- given-names: "Nils"
family-names: "Gehlenborg"
affiliation: "Harvard Medical School"
orcid: "https://orcid.org/0000-0003-0327-8297"
date-published: 2024-09-10
doi: "10.1109/TVCG.2024.3456370"
journal: "Transactions on Visualization and Computer Graphics"
publisher:
name: IEEE
url: "https://ieeexplore.ieee.org/document/10672535"
month: 9
year: 2024
GitHub Events
Total
- Watch event: 10
- Delete event: 4
- Issue comment event: 1
- Push event: 19
- Pull request event: 4
- Create event: 6
Last Year
- Watch event: 10
- Delete event: 4
- Issue comment event: 1
- Push event: 19
- Pull request event: 4
- Create event: 6