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

New detector: naive WIP #4

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

breznak
Copy link
Member

@breznak breznak commented Jul 24, 2019

WIP

I'd like to add naive/random walk predictor (& detector).

  • implement naive predictor
  • how to obtain anomaly score from scalars predicted & current?

Fixes numenta#343

@breznak breznak added the help wanted Extra attention is needed label Jul 24, 2019
@breznak breznak self-assigned this Jul 24, 2019
Copy link
Member Author

@breznak breznak left a comment

Choose a reason for hiding this comment

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

trying to add a custom Naive predictor

  • as an excercise adding custom NAB detectors

  • Naive is a solid baseline for time-series predictions (but the Anomaly scores are not that good)

  • the scores are bad, I'm not sure if that's "correct" for this detector

  • still crashing on some inputs

FYI: @Japillow

"""
This is implementation of the "naive forecast", aka "random walk forecasting",
which is a baseline algorithm for time-series forecasting.
It predicts the last seen value. So `Prediction(t+1) = Input(t)`.
Copy link
Member Author

Choose a reason for hiding this comment

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

Naive, random-walk is a simple predictor


# the computation
x = abs(current - predicted)/predicted
score = 1-math.exp(-self.coef * x)
Copy link
Member Author

Choose a reason for hiding this comment

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

is there a better way to get anomaly score from predictions?
This a) crashes sometimes, b) does not provide good AD

@breznak breznak changed the title New detector: naive New detector: naive WIP Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add naive/random walk model as baseline
1 participant