Skip to content

Commit 7135157

Browse files
Allow subsetting TOL classifier
Adds functions to TreeOfLifeClassifier to allow subsetting the embeddings. The get_label_data() method returns a dataframe of the labels for the TOL txt embeddings. The create_taxa_filter() method creates a filter (boolean array) for the txt embeddings based on a taxa and values. The apply_filter() method filters the classifier for a filter. The filter is a boolean array with the same length as the txt embeddings. Part of #56 Co-authored-by: Elizabeth Campolongo <[email protected]>
1 parent 63464af commit 7135157

File tree

4 files changed

+917
-6
lines changed

4 files changed

+917
-6
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ If you have any issues with installation, please first upgrade pip by running `p
3434
- Predict species for images - [examples/PredictImages.ipynb](examples/PredictImages.ipynb) <a target="_blank" href="https://colab.research.google.com/github/Imageomics/pybioclip/blob/main/examples/PredictImages.ipynb">
3535
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
3636
- Predict species for [iNaturalist](https://www.inaturalist.org/) images - [examples/iNaturalistPredict.ipynb](examples/iNaturalistPredict.ipynb) <a target="_blank" href="https://colab.research.google.com/github/Imageomics/pybioclip/blob/main/examples/iNaturalistPredict.ipynb">
37-
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
38-
</a>
37+
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
38+
- Predict using a subset of the TreeOfLife - [examples/TOL-Subsetting.ipynb](examples/TOL-Subsetting.ipynb) <a target="_blank" href="https://colab.research.google.com/github/Imageomics/pybioclip/blob/main/examples/TOL-Subsetting.ipynb">
39+
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
3940

4041
### Predict species classification
4142

0 commit comments

Comments
 (0)