Added outlier detection funcitons#36
Open
michaelkiper wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds outlier detection functionality to the cover-class repository and fixes a data type conversion issue in the training pipeline.
Key changes:
- Adds a new
outlier_detection.pymodule with multiple outlier detection methods (z-score, k-means, Mahalanobis distance, and LOF) - Fixes train label conversion to explicitly use
LongTensortype - Documents the new outlier detection feature in README with usage examples
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/cover_class/outlier_detection.py | New module implementing four outlier detection methods with visualization capabilities |
| src/cover_class/train.py | Wraps train_labels with LongTensor conversion for proper type handling in dataloader |
| README.md | Adds documentation section for outlier detection feature with usage examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds in a set of stand-alone functions for outlier detection for input data. Specifically, it offers the below 4 methods:
The main
show_outliersfunction outputs a PNG (see example below) that highlights all the outliers, and provides indices of those outliers.Related Tickets
resolves #28