Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add trait for anomaly detectors #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ditsuke
Copy link

@ditsuke ditsuke commented Dec 19, 2023

Add trait for anomaly detectors. Closes #4


trait AnomalyDetector<F: Float + FromPrimitive + AddAssign + SubAssign + MulAssign + DivAssign> {
fn learn_one(&mut self, observation: &Observation<F>);
fn score_one(&mut self, observation: &Observation<F>) -> Option<ClassifierOutput<F>>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We continue to discuss the output type of score one, I merge your pr when we decide that is the good format. Thank you for your contribution 😄

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha no problem. Let me know if it's a public discussion 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement Anomaly Detector trait
2 participants