Skip to content

Commit

Permalink
Solving issues with test_ssl_classifiers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hmgomes committed Apr 18, 2024
1 parent 7efe451 commit 6c3d4e6
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions tests/test_ssl_classifiers.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from capymoa.datasets._datasets import ElectricityTiny, CovtypeTiny
from capymoa.ssl.classifier import OSNN, CPSSDS
import pytest
from capymoa.ssl.classifier import OSNN

import pytest
from capymoa.evaluation.evaluation import prequential_SSL_evaluation
from capymoa.evaluation.evaluation import prequential_ssl_evaluation
from capymoa.base import ClassifierSSL
from capymoa.stream import Stream
from functools import partial
Expand All @@ -16,7 +15,7 @@ def assert_ssl_evaluation(
label_probability: float = 0.01,
max_instances: int = 1000,
):
results = prequential_SSL_evaluation(
results = prequential_ssl_evaluation(
stream=stream,
learner=learner,
label_probability=label_probability,
Expand All @@ -34,18 +33,10 @@ def assert_ssl_evaluation(
[
(partial(OSNN, optim_steps=10), ElectricityTiny, 46.1, None),
(partial(OSNN, optim_steps=10), CovtypeTiny, 26.3, None),
(partial(CPSSDS, batch_size=100, base_model="NaiveBayes"), ElectricityTiny, 76.6, 0.5),
(partial(CPSSDS, batch_size=100, base_model="HoeffdingTree"), ElectricityTiny, 66.2, 0.5),
(partial(CPSSDS, batch_size=100, base_model="NaiveBayes"), CovtypeTiny, 55.7, 0.5),
(partial(CPSSDS, batch_size=100, base_model="HoeffdingTree"), CovtypeTiny, 53.3, 0.5),
],
ids=[
"OSNN_ElectricityTiny",
"OSNN_ElectricityTiny",
"OSNN_CovtypeTiny",
"CPSSDS_ElectricityTiny-NaiveBayes",
"CPSSDS_ElectricityTiny-HoeffdingTree",
"CPSSDS_CovtypeTiny-NaiveBayes",
"CPSSDS_CovtypeTiny-HoeffdingTree",
],
)
def test_ssl_classifiers(learner_constructor, stream_constructor, expectation, label_probability):
Expand Down

0 comments on commit 6c3d4e6

Please sign in to comment.