def __init__(self, *args, **kwargs):
        import svm
        self._svm = svm
        # Cached LIBSVM or LIBLINEAR model:
        self._model = None
        # SVM.extensions is a tuple of extension modules that can be used.
        # By default, LIBLINEAR will be used for linear SVC (it is faster).
        # If you do not want to use LIBLINEAR, use SVM(extension=LIBSVM).
        self._extensions = \
            kwargs.get("extensions", 
            kwargs.get("extension", (LIBSVM, LIBLINEAR)))
        # Optional parameters are read-only:
        # -  cost: higher cost = less margin for error (and risk of overfitting).
        # - gamma: influence ("radius") of each training example for RBF.
        if len(args) > 0: 
            kwargs.setdefault( "train", args[0])
        if len(args) > 1: 
            kwargs.setdefault(  "type", args[1])
        if len(args) > 2: 
            kwargs.setdefault("kernel", args[2])
        for k1, k2, v in (
            (       "type", "s", CLASSIFICATION),
            (     "kernel", "t", LINEAR),
            (     "degree", "d", 3),   # For POLYNOMIAL.
            (      "gamma", "g", 0),   # For POLYNOMIAL + RADIAL.
            (     "coeff0", "r", 0),   # For POLYNOMIAL.
            (       "cost", "c", 1),   # Can be optimized with gridsearch().
            (    "epsilon", "p", 0.1),
            (         "nu", "n", 0.5),
            (      "cache", "m", 100), # MB
            (  "shrinking", "h", True)):
                v = kwargs.get(k2, kwargs.get(k1, v))
                setattr(self, "_"+k1, v)
        # SVC/SVR/SVO alias.
        if self._type == "svc":
            self._type = SVC
        if self._type == "svr":
            self._type = SVR
        if self._type == "svo":
            self._type = SVO
        # RBF alias.
        if self._kernel == "rbf":
            self._kernel = RBF
        Classifier.__init__(self, train=kwargs.get("train", []), baseline=MAJORITY)
Create database tables from sqlalchemy models
dataset/ETHPy150Open clips/pattern/pattern/vector/__init__.py/SVM.__init__--crossover with--dataset/ETHPy150Open hasgeek/coaster/coaster/manage.py/create