Skip to content

Commit

Permalink
Update RANK test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
KulikDM committed Sep 7, 2023
1 parent dcd7971 commit 4e8ad77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
16 changes: 0 additions & 16 deletions docs/pythresh.utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,3 @@
:undoc-members:
:show-inheritance:
:inherited-members:

*****************
Module contents
*****************

.. automodule:: pythresh.utils
:members:
:undoc-members:
:show-inheritance:
:inherited-members:

.. rubric:: References

.. bibliography::
:cited:
:labelprefix:
9 changes: 6 additions & 3 deletions pythresh/test/test_rank.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import sys
import unittest
from itertools import product
from os.path import dirname as up

# noinspection PyProtectedMember
Expand Down Expand Up @@ -29,7 +30,7 @@ def setUp(self):

self.clfs = [KNN(), PCA(), IForest()]

self.thres = FILTER()
self.thres = [FILTER(), self.contamination]

self.weights = [[0.5, 0.25, 0.25],
[0.25, 0.5, 0.25],
Expand All @@ -38,9 +39,11 @@ def setUp(self):

def test_prediction_labels(self):

for weights in self.weights:
params = product(self.thres, self.weights)

ranker = RANK(self.clfs, self.thres, weights=weights)
for thres, weights in params:

ranker = RANK(self.clfs, thres, weights=weights)
rankings = ranker.eval(self.X_train)

cdf_rank = ranker.cdf_rank_
Expand Down

0 comments on commit 4e8ad77

Please sign in to comment.