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

Use absolute features when doing training/prediction. #11876

Merged
merged 2 commits into from
Jan 13, 2022

Conversation

vkalintiris
Copy link
Contributor

@vkalintiris vkalintiris commented Dec 8, 2021

Summary

Add a final step to the preprocessing of feature vectors to make them always be absolute values only. This follows on from some internal research showing the impact of this on the distance measure used to generate anomaly scores (illustrative colab notebook).

In below chart we add some contamination to the metric in last part of the chart.

image

Orange line below then shows impact of ensuring feature vectors are all absolute as opposed to allowing both positive and negative which can lead to a bias in distance measures of metics such as system.cpu that tend to randomly move up and down from second to second.

image

In this case the orange line behaves better as an anomaly score and jumps consistently in the period of contaminated data. Whereas the implementation that does not force absolute values actually performs worse. Essentially this is because allowing positive and negative values "naturally" suppresses distance measures since elements of the feature vector can essentially cancel each other out when you try to compare distances.

Component Name

area/ml

Test Plan

CI & verification with the ML team.

@vkalintiris vkalintiris added the area/ml Machine Learning Related Issues label Dec 8, 2021
andrewm4894
andrewm4894 previously approved these changes Dec 9, 2021
Copy link
Contributor

@andrewm4894 andrewm4894 left a comment

Choose a reason for hiding this comment

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

LGTM. Tested and verified it behaves as expected on one of our devml nodes.

Copy link
Contributor

@andrewm4894 andrewm4894 left a comment

Choose a reason for hiding this comment

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

LGTM

@vkalintiris vkalintiris merged commit 90ceb55 into netdata:master Jan 13, 2022
@vkalintiris vkalintiris deleted the abs-samples branch July 5, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ml Machine Learning Related Issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants