source: orange/Orange/testing/unit/tests/test_majority.py @ 10651:4f6fcf57db06

Revision 10651:4f6fcf57db06, 1.7 KB checked in by markotoplak, 2 years ago (diff)

Moved caching, collections, debugging, fileutil, r, testing from misc to utils.

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