Skip to content

Commit

Permalink
Fixed typo and updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KulikDM committed Jan 25, 2024
1 parent 95657cb commit 27352ac
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions pythresh/test/test_chau.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ def test_prediction_labels(self):
self.thres = CHAU(method=method)
pred_labels = self.thres.eval(scores)
assert (self.thres.thresh_ is not None)
assert (self.thres.dscores_ is not None)

assert (self.thres.dscores_.min() == 0)
assert (self.thres.dscores_.max() == 1)

assert_equal(pred_labels.shape, self.y_train.shape)

Expand Down
5 changes: 4 additions & 1 deletion pythresh/test/test_decomp.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ def test_prediction_labels(self):

self.thres = DECOMP(method=method)
pred_labels = self.thres.eval(scores)
assert (self.thres.thresh_ is not None)
assert (self.thres.dscores_ is not None)

assert (self.thres.dscores_.min() == 0)
assert (self.thres.dscores_.max() == 1)

assert_equal(pred_labels.shape, self.y_train.shape)

Expand Down
4 changes: 4 additions & 0 deletions pythresh/test/test_dsn.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ def test_prediction_labels(self):
self.thres = DSN(metric=metric)
pred_labels = self.thres.eval(scores)
assert (self.thres.thresh_ is not None)
assert (self.thres.dscores_ is not None)

assert (self.thres.dscores_.min() == 0)
assert (self.thres.dscores_.max() == 1)

assert_equal(pred_labels.shape, self.y_train.shape)

Expand Down
4 changes: 4 additions & 0 deletions pythresh/test/test_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ def test_prediction_labels(self):
self.thres = FILTER(method=method, sigma=sigma)
pred_labels = self.thres.eval(scores)
assert (self.thres.thresh_ is not None)
assert (self.thres.dscores_ is not None)

assert (self.thres.dscores_.min() == 0)
assert (self.thres.dscores_.max() == 1)

assert_equal(pred_labels.shape, self.y_train.shape)

Expand Down
2 changes: 1 addition & 1 deletion pythresh/thresholds/cpd.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CPD(BaseThresholder):
Attributes
----------
thres_ : threshold value that separates inliers from outliers
thresh_ : threshold value that separates inliers from outliers
dscores_ : 1D array of decomposed decision scores
Expand Down

0 comments on commit 27352ac

Please sign in to comment.