Example #1
0
 def get_labelpowerset_with_nb(self):
     return LabelPowerset(classifier=GaussianNB(),
                          require_dense=[True, True])
Example #2
0
 def get_labelpowerset_with_svc(self):
     return LabelPowerset(classifier=SVC(), require_dense=[False, True])
Example #3
0
    def test_if_dense_classification_works_on_dense_base_classifier(self):
        classifier = LabelPowerset(classifier=GaussianNB(),
                                   require_dense=[True, True])

        self.assertClassifierWorksWithSparsity(classifier, 'dense')
Example #4
0
    def test_if_works_with_cross_validation(self):
        classifier = LabelPowerset(classifier=GaussianNB(),
                                   require_dense=[True, True])

        self.assertClassifierWorksWithCV(classifier)
Example #5
0
    def test_if_sparse_classification_works_on_non_dense_base_classifier(self):
        classifier = LabelPowerset(classifier=SVC(),
                                   require_dense=[False, True])

        self.assertClassifierWorksWithSparsity(classifier, 'sparse')