Changeset 10678:f024c0f62be0 in orange


Ignore:
Timestamp:
03/28/12 15:04:22 (2 years ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Added tests for LibLinearLogRegLearner.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/testing/unit/tests/test_logreg.py

    r10655 r10678  
    77from orngLR import LogRegLearner, Univariate_LogRegLearner, StepWiseFSS, StepWiseFSS_Filter 
    88 
     9from Orange.classification.logreg import LibLinearLogRegLearner 
    910def datasets_iter(): 
    1011    for name, (data,) in testing.datasets_iter(testing.CLASSIFICATION_DATASETS): 
     
    2526 
    2627 
    27 #@testing.data_driven(data_iter=datasets_iter()) 
    28 #class TestUniLogRegLearner(testing.LearnerTestCase): 
    29 #    LEARNER = Univariate_LogRegLearner 
    30 #    @testing.test_on_data 
    31 #    def test_learner_on(self, dataset): 
    32 #        """ Test LogRegLearner. 
    33 #        """ 
    34 #        if len(dataset) < len(dataset.domain.attributes): 
    35 #            raise unittest.SkipTest("No enough examples") 
    36 #        testing.LearnerTestCase.test_learner_on(self, dataset) 
    37  
    3828@testing.data_driven(data_iter=datasets_iter()) 
    3929class TestStepWiseFSS(unittest.TestCase): 
     
    4939        self.assertTrue([a1 == a2 for a1, a2 in zip(attrs, new_dataset.domain.attributes)]) 
    5040 
     41@testing.datasets_driven(datasets=testing.CLASSIFICATION_DATASETS) 
     42class TestLibLinearLogRegLearner(testing.LearnerTestCase): 
     43    LEARNER = LibLinearLogRegLearner 
     44    @testing.test_on_data 
     45    def test_learner_on(self, dataset): 
     46        """ Test LibLinearLogRegLearner. 
     47        """ 
     48        testing.LearnerTestCase.test_learner_on(self, dataset) 
     49 
    5150if __name__ == "__main__": 
    5251    unittest.main() 
Note: See TracChangeset for help on using the changeset viewer.