Any insight on having 0% accuracy in this data? #882
Answered
by
MaxHalford
craigbrown-nist
asked this question in
Q&A
-
I have v0.9 and tried several of the Anomaly detectors, and none work very well at all on simple data from NAB (using AWS data with an index and CPU usage, and no dates etc but with a data jump and outliers-partial example below). No parameter change in this particular example affects the scores.... I would appreciate it if anyone could point to where I'm going wrong. import numpy as np
import pandas as pd
from river import stream
from river import compose
from river import anomaly
from river import metrics
from river import preprocessing
X = pd.read_csv('NAB/data/realAWSCloudwatch/rds_cpu_utilization_cc0c53-1.csv')
Y = X["value"]
X = X.drop("value", axis = 'columns')
X_y = stream.iter_pandas(X, Y)
model = compose.Pipeline(
preprocessing.MinMaxScaler(),
anomaly.ConstantThresholder(
anomaly.HalfSpaceTrees(seed=42),
threshold=0.8
)
)
report = metrics.ClassificationReport()
for x, y in X_y:
score = model.score_one(x)
model = model.learn_one(x)
report = report.update(y, score)
report
|
Beta Was this translation helpful? Give feedback.
Answered by
MaxHalford
Mar 17, 2022
Replies: 1 comment 3 replies
-
Hello. What exact data are you using? This dataset? The only feature is a date, so it's not clear to me what preprocessing you've done. |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
craigbrown-nist
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello. What exact data are you using? This dataset? The only feature is a date, so it's not clear to me what preprocessing you've done.