__init__.py 786 Bytes
Newer Older
1 2 3
from .classifier import Classifier

try:
4
    from .weka_classifiers import WekaClassifiers
5
except:
6
    WekaClassifiers = None
7 8 9 10 11 12 13 14 15 16

__all__ = ["classifier",
           "weka_classifiers"]


from collections import OrderedDict
from util.config import Config


_classifier_list = OrderedDict( [ 
17
                            ["weka_classifiers", Config("Invalid" if WekaClassifiers is None else WekaClassifiers.__name__,
18
                                WekaClassifiers is not None, bool, meta=WekaClassifiers, hidden=WekaClassifiers is None)]
19 20 21 22 23 24 25
                        ] )

def get_classifier_config():
    return _classifier_list

def set_classifier_config(configs):
    _classifier_list["weka_classifiers"] = Config.nvl_config(configs["weka_classifiers"], _classifier_list["weka_classifiers"])