Skip to content

Commit

Permalink
updated examples
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianGroeger96 committed Mar 23, 2024
1 parent 468de04 commit 889adea
Show file tree
Hide file tree
Showing 8 changed files with 1,225 additions and 454 deletions.
Git LFS file not shown
Git LFS file not shown
417 changes: 0 additions & 417 deletions examples/Investigate_Flowers102.ipynb

This file was deleted.

759 changes: 759 additions & 0 deletions examples/Investigate_Imagenette.ipynb

Large diffs are not rendered by default.

479 changes: 444 additions & 35 deletions examples/Investigate_OxfordIIITPet.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def parse_requirements(filename):
name=PACKAGE_NAME,
packages=proj_packages,
package_dir={PACKAGE_NAME: SOURCE_DIRECTORY},
version="0.0.15",
version="0.0.16",
author="Fabian Groeger",
author_email="fabian.groeger@unibas.ch",
description="A holistic self-supervised data cleaning strategy to detect irrelevant samples, near duplicates and label errors.",
Expand Down
2 changes: 1 addition & 1 deletion src/ssl_library
14 changes: 14 additions & 0 deletions tests/unittests/cleaner/test_selfclean_cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ def test_predict(self):
self.assertIsNotNone(v["scores"])
self.assertEqual(len(v["indices"]), len(v["scores"]))

def test_2_predict(self):
cleaner = SelfCleanCleaner(memmap=False)
cleaner.fit(emb_space=self.emb_space, labels=self.labels)
out_dict = cleaner.predict()
out_dict = cleaner.predict()
for issue_type in ["irrelevants", "near_duplicates", "label_errors"]:
v = out_dict.get_issues(issue_type)
self.assertIsNotNone(v)
self.assertTrue("indices" in v)
self.assertTrue("scores" in v)
self.assertIsNotNone(v["indices"])
self.assertIsNotNone(v["scores"])
self.assertEqual(len(v["indices"]), len(v["scores"]))

def test_predict_with_class_labels(self):
cleaner = SelfCleanCleaner(memmap=False)
cleaner.fit(
Expand Down

0 comments on commit 889adea

Please sign in to comment.