flair icon indicating copy to clipboard operation
flair copied to clipboard

[Feature]: Anomaly Detection / One Class Classification

Open jeffpicard opened this issue 1 year ago • 3 comments

Problem statement

Flair doesn't have an Anomaly Detection / One Class Classification model. While this question describes alternate solutions, some use cases could benefit from this dedicated model type.

Solution

Add a new AnomalyDetection class to flair.models. The implementation would train an autoencoder on a single class of data. At inference time, the autoencoder's reconstruction error of the input would be calculated and compared to a threshold to determine whether the input is in-class.

Additional Context

I plan to pull request code for this soon.

jeffpicard avatar Jul 08 '24 18:07 jeffpicard

Hello @jeffpicard that sounds great, let us know if you need any help!

alanakbik avatar Jul 09 '24 07:07 alanakbik

Thanks @alanakbik! I put up a first stab (linked above) if you're interested.

jeffpicard avatar Jul 15 '24 17:07 jeffpicard

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 26 '25 04:04 stale[bot]