source: orange/testing/unittests/tests/test_lasso.py @ 8825:348e066a9f1f

Revision 8825:348e066a9f1f, 769 bytes checked in by ales_erjavec <ales.erjavec@…>, 3 years ago (diff)

Added basic tests for linear and lasso regression.

Line 
1from Orange.misc import testing
2from Orange.misc.testing import datasets_driven, test_on_data, test_on_datasets
3from Orange.regression import lasso
4import Orange
5import unittest
6
7#@datasets_driven(datasets=["servo", "housing"]) # Dont test on auto-mpg - takes too long. Should  use a different continuizer.
8@datasets_driven(datasets=testing.REGRESSION_DATASETS)
9class TestLassoRegressionLearner(testing.LearnerTestCase):
10   
11    def setUp(self):
12        self.learner = lasso.LassoRegressionLearner(nBoot=2, nPerm=2)
13   
14    @test_on_data
15    def test_learner_on(self, dataset):
16        testing.LearnerTestCase.test_learner_on(self, dataset)
17        lasso.print_lasso_regression_model(self.classifier)
18       
19       
20if __name__ == "__main__":
21    unittest.main()
Note: See TracBrowser for help on using the repository browser.