source: orange/Orange/testing/unit/tests/test_majority.py @ 9679:3879dea56188

Revision 9679:3879dea56188, 1.7 KB checked in by Miha Stajdohar <miha.stajdohar@…>, 2 years ago (diff)

Moved and renamed testing.

Line 
1from Orange.misc import testing
2from Orange.misc.testing import datasets_driven, test_on_data
3from Orange.classification import majority
4from Orange.statistics import distribution
5import Orange
6import unittest
7
8@datasets_driven(datasets=testing.CLASSIFICATION_DATASETS + \
9                 testing.REGRESSION_DATASETS)
10class TestMajorityLearner(testing.LearnerTestCase):
11    LEARNER = majority.MajorityLearner()
12   
13@datasets_driven(datasets=testing.CLASSIFICATION_DATASETS)
14class TestMajorityLearnerWithMEstimator(testing.LearnerTestCase):
15    LEARNER = majority.MajorityLearner(estimator_constructor= \
16                    Orange.core.ProbabilityEstimatorConstructor_m(m=3))
17   
18@datasets_driven(datasets=testing.CLASSIFICATION_DATASETS)
19class TestMajorityLearnerWithLaplaceEstimator(testing.LearnerTestCase):
20    LEARNER = majority.MajorityLearner(estimator_constructor= \
21                    Orange.core.ProbabilityEstimatorConstructor_Laplace())
22   
23@datasets_driven(datasets=testing.REGRESSION_DATASETS)
24class TestMajorityLearnerWithKernelEstimator(testing.LearnerTestCase):
25    LEARNER = majority.MajorityLearner(estimator_constructor= \
26                    Orange.core.ProbabilityEstimatorConstructor_kernel())
27
28@datasets_driven(datasets=testing.REGRESSION_DATASETS)
29class TestMajorityLearnerWithLoessEstimator(testing.LearnerTestCase):
30    LEARNER = majority.MajorityLearner(estimator_constructor= \
31                    Orange.core.ProbabilityEstimatorConstructor_loess())
32   
33#@datasets_driven(datasets=testing.CLASSIFICATION_DATASETS + \
34#                 testing.REGRESSION_DATASETS)
35#class TestMajorityLearner(testing.LearnerTestCase):
36#    LEARNER = majority.MajorityLearner()
37     
38
39if __name__ == "__main__":
40    unittest.main()
Note: See TracBrowser for help on using the repository browser.