def __init__(self, train=[], baseline=MAJORITY, **kwargs):
        data = getattr(self, "_data", {})
        self.description = ""       # Description of the dataset: author e-mail, etc.
        self._data       = data     # Custom data to store when pickled.
        self._vectors    = []       # List of trained (type, vector)-tuples.
        self._classes    = {}       # Dict of (class, frequency)-items.
        self._baseline   = baseline # Default predicted class.
        # Train on the list of Document objects or (document, type)-tuples:
        for d in (isinstance(d, Document) and (d, d.type) or d for d in train):
            self.train(*d)
        # In Pattern 2.5-, Classifier.test() is a classmethod.
        # In Pattern 2.6+, it is replaced with Classifier._test() once instantiated:
        self.test = self._test
A base class for Naive Bayes, k-NN and SVM.
dataset/ETHPy150Open clips/pattern/pattern/vector/__init__.py/Classifier.__init__