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

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

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

Line 
1try:
2    import unittest2 as unittest
3except:
4    import unittest
5
6from Orange.utils import testing
7from Orange.utils.testing import datasets_driven, test_on_datasets
8
9@datasets_driven(datasets=testing.CLASSIFICATION_DATASETS)
10class TestBoosting(testing.LearnerTestCase):
11    def setUp(self):
12        import orngEnsemble, orngTree
13        self.learner = orngEnsemble.BoostedLearner(orngTree.TreeLearner)
14
15    @test_on_datasets(datasets=["iris"])
16    def test_pickling_on(self, dataset):
17        testing.LearnerTestCase.test_pickling_on(self, dataset)
18
19@datasets_driven(datasets=testing.CLASSIFICATION_DATASETS + \
20                 testing.REGRESSION_DATASETS)
21class TestBagging(testing.LearnerTestCase):
22    def setUp(self):
23        import orngEnsemble, orngTree
24        self.learner = orngEnsemble.BaggedLearner(orngTree.TreeLearner)
25
26    @test_on_datasets(datasets=["iris"])
27    def test_pickling_on(self, dataset):
28        testing.LearnerTestCase.test_pickling_on(self, dataset)
29
30
31@datasets_driven(datasets=testing.CLASSIFICATION_DATASETS)
32class TestRandomForest(testing.LearnerTestCase):
33    def setUp(self):
34        import orngEnsemble, orngTree
35        self.learner = orngEnsemble.RandomForestLearner()
36
37    @test_on_datasets(datasets=testing.CLASSIFICATION_DATASETS + \
38                      testing.REGRESSION_DATASETS)
39    def test_pickling_on(self, dataset):
40        testing.LearnerTestCase.test_pickling_on(self, dataset)
41
42
43
44if __name__ == "__main__":
45    import unittest
46    unittest.main()
Note: See TracBrowser for help on using the repository browser.