Skip to content

Commit

Permalink
Remove check of y being a subset of X in AnomalyView
Browse files Browse the repository at this point in the history
It doesn't need to be, as this logic is up to the .anomaly()
implementation of the model being served. Currently, DiffBasedAnomaly
does not require y to be a subset of X, because it only compares
y and yhat.
  • Loading branch information
milesgranger committed Aug 31, 2019
1 parent 0b2b84d commit 6d75c37
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions gordo_components/server/views/anomaly.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,6 @@ def _create_anomaly_response(self, start_time: float = None):
}
return make_response((jsonify(message), 400))

# It is ok for y to be a subset of features in X, but we need at least one
# to compare against to calculate an error.
if not any(col in g.y.columns for col in [t.name for t in self.tags]):
message = {"message": "y is not a subset of X, cannot do anomaly detection"}
return make_response(jsonify(message), 400)

# Now create an anomaly dataframe from the base response dataframe
try:
anomaly_df = current_app.model.anomaly(g.X, g.y, frequency=self.frequency)
Expand Down

0 comments on commit 6d75c37

Please sign in to comment.