Skip to content

Commit

Permalink
feat: support multivariate threshold output (#314)
Browse files Browse the repository at this point in the history
Multivariate thresholding produces a single-dimensional output. This
change makes sure that we preserve the dimensions in postprocess in
order to create a valid OutputPayload

Signed-off-by: Avik Basu <[email protected]>
  • Loading branch information
ab93 committed Oct 12, 2023
1 parent 64c2e95 commit 509e38a
Show file tree
Hide file tree
Showing 4 changed files with 898 additions and 833 deletions.
2 changes: 1 addition & 1 deletion numalogic/udfs/postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def compute(
except Exception as err:
raise RuntimeError("Threshold model scoring failed") from err
try:
win_score = np.mean(y_score, axis=0)
win_score = np.mean(y_score, axis=0, keepdims=True)
score = postproc_clf.transform(win_score)
except Exception as err:
raise RuntimeError("Postprocess failed") from err
Expand Down
Loading

0 comments on commit 509e38a

Please sign in to comment.