Skip to content

Commit

Permalink
Merge branch 'main' into feature/forecast-auto-select
Browse files Browse the repository at this point in the history
  • Loading branch information
darenr committed May 14, 2024
2 parents a85cc97 + 5fe8c49 commit faf1684
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ads/opctl/operator/lowcode/anomaly/model/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,11 @@ def _fallback_build_model(self):
# Iterate over the full_data_dict items
for target, df in self.datasets.full_data_dict.items():
est = linear_model.SGDOneClassSVM(random_state=42)
est.fit(df[target].values.reshape(-1, 1))
est.fit(df[self.spec.target_column].fillna(0).values.reshape(-1, 1))
y_pred = np.vectorize(self.outlier_map.get)(
est.predict(df[target].values.reshape(-1, 1))
est.predict(df[self.spec.target_column].fillna(0).values.reshape(-1, 1))
)
scores = est.score_samples(df[target].values.reshape(-1, 1))
scores = est.score_samples(df[self.spec.target_column].fillna(0).values.reshape(-1, 1))

anomaly = pd.DataFrame(
{date_column: df[date_column], OutputColumns.ANOMALY_COL: y_pred}
Expand Down

0 comments on commit faf1684

Please sign in to comment.