source: orange/orange/Orange/multilabel/__init__.py @ 9500:39a2fa79d715

Revision 9500:39a2fa79d715, 714 bytes checked in by matija <matija.polajnar@…>, 2 years ago (diff)

Converting MLC methods to the new file format. Also, some major code revision due to poor code quality.

Line 
1import Orange
2
3from multibase import MultiLabelLearner
4from multibase import MultiLabelClassifier
5
6from br import BinaryRelevanceLearner
7from br import BinaryRelevanceClassifier
8
9from lp import LabelPowersetLearner
10from lp import LabelPowersetClassifier
11
12from multiknn import MultikNNLearner
13from multiknn import MultikNNClassifier
14
15from mlknn import MLkNNLearner
16from mlknn import MLkNNClassifier
17
18from brknn import BRkNNLearner
19from brknn import BRkNNClassifier
20
21def is_multilabel(data):
22    if not data.domain.class_vars:
23        return False
24    for c in data.domain.class_vars:
25        if type(c) is not Orange.data.variable.Discrete or sorted(c.values) != ['0', '1']:
26            return False
27    return True
Note: See TracBrowser for help on using the repository browser.