'Support Vector Machine (SVM) is a supervised learning method
where training documents are represented as points in n-dimensional space.
The SVM constructs a number of hyperplanes that subdivide the space.
Optional parameters:
-      type = CLASSIFICATION,
-    kernel = LINEAR,
-    solver = 1,
-    degree = 3,
-     gamma = 1 / len(SVM.features),
-    coeff0 = 0,
-      cost = 1,
-   epsilon = 0.01,
-     cache = 100,
- shrinking = True,
- extension = (LIBSVM, LIBLINEAR),
-     train = []'

def __init__(self, *args, **kwargs):

    import svm
    self._svm = svm
    self._model = None
    self._extensions = kwargs.get('extensions', kwargs.get('extension', (LIBSVM, LIBLINEAR)))
    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), ('solver', 'f', 1), ('degree', 'd', 3), ('gamma', 'g', 0), ('coeff0', 'r', 0), ('cost', 'c', 1), ('epsilon', 'p', 0.1), ('nu', 'n', 0.5), ('cache', 'm', 100), ('shrinking', 'h', True)):
        v = kwargs.get(k2, kwargs.get(k1, v))
        setattr(self, ('_' + k1), v)
    if (self._type == 'svc'):
        self._type = SVC
    if (self._type == 'svr'):
        self._type = SVR
    if (self._type == 'svo'):
        self._type = SVO
    if (self._kernel == 'rbf'):
        self._kernel = RBF
    if (self._solver == 'logit'):
        self._solver = LOGIT
    Classifier.__init__(self, train=kwargs.get('train', []), baseline=MAJORITY)
