# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

"""otsvm module"""

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _otsvm
else:
    import _otsvm

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


import openturns.base
import openturns.common
import openturns.typ
import openturns.statistics
import openturns.graph
import openturns.func
import openturns.geom
import openturns.diff
import openturns.optim
import openturns.experiment
import openturns.solver
import openturns.algo
import openturns.uncertainty
import openturns.model_copula
import openturns.randomvector
import openturns.dist_bundle1
import openturns.dist_bundle2
import openturns.weightedexperiment
import openturns.classification
import openturns.orthogonalbasis
import openturns.metamodel
import openturns.transformation
import openturns.analytical
import openturns.simulation
import openturns.stattests
import openturns.model_process
class SVMKernelImplementation(openturns.common.PersistentObject):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def getClassName(self):
        r"""
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.SVMKernelImplementation_getClassName(self)

    def __repr__(self):
        return _otsvm.SVMKernelImplementation___repr__(self)

    def getParameter(self):
        return _otsvm.SVMKernelImplementation_getParameter(self)

    def setParameter(self, value):
        return _otsvm.SVMKernelImplementation_setParameter(self, value)

    def getParameters(self):
        return _otsvm.SVMKernelImplementation_getParameters(self)

    def setParameters(self, parameters):
        return _otsvm.SVMKernelImplementation_setParameters(self, parameters)

    def __call__(self, x1, x2):
        return _otsvm.SVMKernelImplementation___call__(self, x1, x2)

    def partialGradient(self, x1, x2):
        return _otsvm.SVMKernelImplementation_partialGradient(self, x1, x2)

    def partialHessian(self, x1, x2):
        return _otsvm.SVMKernelImplementation_partialHessian(self, x1, x2)

    def __init__(self, *args):
        _otsvm.SVMKernelImplementation_swiginit(self, _otsvm.new_SVMKernelImplementation(*args))
    __swig_destroy__ = _otsvm.delete_SVMKernelImplementation

# Register SVMKernelImplementation in _otsvm:
_otsvm.SVMKernelImplementation_swigregister(SVMKernelImplementation)

class SVMKernelImplementationTypedInterfaceObject(openturns.common.InterfaceObject):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _otsvm.SVMKernelImplementationTypedInterfaceObject_swiginit(self, _otsvm.new_SVMKernelImplementationTypedInterfaceObject(*args))

    def getImplementation(self):
        r"""
        Accessor to the underlying implementation.

        Returns
        -------
        impl : Implementation
            The implementation class.
        """
        return _otsvm.SVMKernelImplementationTypedInterfaceObject_getImplementation(self)

    def setName(self, name):
        r"""
        Accessor to the object's name.

        Parameters
        ----------
        name : str
            The name of the object.
        """
        return _otsvm.SVMKernelImplementationTypedInterfaceObject_setName(self, name)

    def getName(self):
        r"""
        Accessor to the object's name.

        Returns
        -------
        name : str
            The name of the object.
        """
        return _otsvm.SVMKernelImplementationTypedInterfaceObject_getName(self)

    def __eq__(self, other):
        return _otsvm.SVMKernelImplementationTypedInterfaceObject___eq__(self, other)

    def __ne__(self, other):
        return _otsvm.SVMKernelImplementationTypedInterfaceObject___ne__(self, other)
    __swig_destroy__ = _otsvm.delete_SVMKernelImplementationTypedInterfaceObject

# Register SVMKernelImplementationTypedInterfaceObject in _otsvm:
_otsvm.SVMKernelImplementationTypedInterfaceObject_swigregister(SVMKernelImplementationTypedInterfaceObject)

class SVMKernel(SVMKernelImplementationTypedInterfaceObject):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    @staticmethod
    def GetClassName():
        return _otsvm.SVMKernel_GetClassName()

    def getClassName(self):
        return _otsvm.SVMKernel_getClassName(self)

    def __repr__(self):
        return _otsvm.SVMKernel___repr__(self)

    def __str__(self, *args):
        return _otsvm.SVMKernel___str__(self, *args)

    def getParameter(self):
        return _otsvm.SVMKernel_getParameter(self)

    def setParameter(self, value):
        return _otsvm.SVMKernel_setParameter(self, value)

    def getParameters(self):
        return _otsvm.SVMKernel_getParameters(self)

    def setParameters(self, parameters):
        return _otsvm.SVMKernel_setParameters(self, parameters)

    def __call__(self, x1, x2):
        return _otsvm.SVMKernel___call__(self, x1, x2)

    def partialGradient(self, x1, x2):
        return _otsvm.SVMKernel_partialGradient(self, x1, x2)

    def partialHessian(self, x1, x2):
        return _otsvm.SVMKernel_partialHessian(self, x1, x2)

    def __init__(self, *args):
        _otsvm.SVMKernel_swiginit(self, _otsvm.new_SVMKernel(*args))
    __swig_destroy__ = _otsvm.delete_SVMKernel

# Register SVMKernel in _otsvm:
_otsvm.SVMKernel_swigregister(SVMKernel)

def SVMKernel_GetClassName():
    return _otsvm.SVMKernel_GetClassName()

class NormalRBF(SVMKernelImplementation):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def getClassName(self):
        r"""
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.NormalRBF_getClassName(self)

    def __repr__(self):
        return _otsvm.NormalRBF___repr__(self)

    def getSigma(self):
        return _otsvm.NormalRBF_getSigma(self)

    def setSigma(self, sigma):
        return _otsvm.NormalRBF_setSigma(self, sigma)

    def getParameter(self):
        return _otsvm.NormalRBF_getParameter(self)

    def setParameter(self, value):
        return _otsvm.NormalRBF_setParameter(self, value)

    def getParameters(self):
        return _otsvm.NormalRBF_getParameters(self)

    def setParameters(self, parameters):
        return _otsvm.NormalRBF_setParameters(self, parameters)

    def __call__(self, x1, x2):
        return _otsvm.NormalRBF___call__(self, x1, x2)

    def partialGradient(self, x1, x2):
        return _otsvm.NormalRBF_partialGradient(self, x1, x2)

    def partialHessian(self, x1, x2):
        return _otsvm.NormalRBF_partialHessian(self, x1, x2)

    def __init__(self, *args):
        _otsvm.NormalRBF_swiginit(self, _otsvm.new_NormalRBF(*args))
    __swig_destroy__ = _otsvm.delete_NormalRBF

# Register NormalRBF in _otsvm:
_otsvm.NormalRBF_swigregister(NormalRBF)

class ExponentialRBF(SVMKernelImplementation):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def getClassName(self):
        r"""
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.ExponentialRBF_getClassName(self)

    def __repr__(self):
        return _otsvm.ExponentialRBF___repr__(self)

    def getSigma(self):
        return _otsvm.ExponentialRBF_getSigma(self)

    def setSigma(self, sigma):
        return _otsvm.ExponentialRBF_setSigma(self, sigma)

    def getParameter(self):
        return _otsvm.ExponentialRBF_getParameter(self)

    def setParameter(self, value):
        return _otsvm.ExponentialRBF_setParameter(self, value)

    def getParameters(self):
        return _otsvm.ExponentialRBF_getParameters(self)

    def setParameters(self, parameters):
        return _otsvm.ExponentialRBF_setParameters(self, parameters)

    def __call__(self, x1, x2):
        return _otsvm.ExponentialRBF___call__(self, x1, x2)

    def partialGradient(self, x1, x2):
        return _otsvm.ExponentialRBF_partialGradient(self, x1, x2)

    def partialHessian(self, x1, x2):
        return _otsvm.ExponentialRBF_partialHessian(self, x1, x2)

    def __init__(self, *args):
        _otsvm.ExponentialRBF_swiginit(self, _otsvm.new_ExponentialRBF(*args))
    __swig_destroy__ = _otsvm.delete_ExponentialRBF

# Register ExponentialRBF in _otsvm:
_otsvm.ExponentialRBF_swigregister(ExponentialRBF)

class RationalKernel(SVMKernelImplementation):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def getClassName(self):
        r"""
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.RationalKernel_getClassName(self)

    def __repr__(self):
        return _otsvm.RationalKernel___repr__(self)

    def getConstant(self):
        return _otsvm.RationalKernel_getConstant(self)

    def setConstant(self, constant):
        return _otsvm.RationalKernel_setConstant(self, constant)

    def getParameter(self):
        return _otsvm.RationalKernel_getParameter(self)

    def setParameter(self, value):
        return _otsvm.RationalKernel_setParameter(self, value)

    def getParameters(self):
        return _otsvm.RationalKernel_getParameters(self)

    def setParameters(self, parameters):
        return _otsvm.RationalKernel_setParameters(self, parameters)

    def __call__(self, x1, x2):
        return _otsvm.RationalKernel___call__(self, x1, x2)

    def partialGradient(self, x1, x2):
        return _otsvm.RationalKernel_partialGradient(self, x1, x2)

    def partialHessian(self, x1, x2):
        return _otsvm.RationalKernel_partialHessian(self, x1, x2)

    def __init__(self, *args):
        _otsvm.RationalKernel_swiginit(self, _otsvm.new_RationalKernel(*args))
    __swig_destroy__ = _otsvm.delete_RationalKernel

# Register RationalKernel in _otsvm:
_otsvm.RationalKernel_swigregister(RationalKernel)

class PolynomialKernel(SVMKernelImplementation):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def getClassName(self):
        r"""
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.PolynomialKernel_getClassName(self)

    def __repr__(self):
        return _otsvm.PolynomialKernel___repr__(self)

    def getDegree(self):
        return _otsvm.PolynomialKernel_getDegree(self)

    def setDegree(self, degree):
        return _otsvm.PolynomialKernel_setDegree(self, degree)

    def getLinear(self):
        return _otsvm.PolynomialKernel_getLinear(self)

    def setLinear(self, linear):
        return _otsvm.PolynomialKernel_setLinear(self, linear)

    def getConstant(self):
        return _otsvm.PolynomialKernel_getConstant(self)

    def setConstant(self, constant):
        return _otsvm.PolynomialKernel_setConstant(self, constant)

    def getParameter(self):
        return _otsvm.PolynomialKernel_getParameter(self)

    def setParameter(self, value):
        return _otsvm.PolynomialKernel_setParameter(self, value)

    def getParameters(self):
        return _otsvm.PolynomialKernel_getParameters(self)

    def setParameters(self, parameters):
        return _otsvm.PolynomialKernel_setParameters(self, parameters)

    def __call__(self, x1, x2):
        return _otsvm.PolynomialKernel___call__(self, x1, x2)

    def partialGradient(self, x1, x2):
        return _otsvm.PolynomialKernel_partialGradient(self, x1, x2)

    def partialHessian(self, x1, x2):
        return _otsvm.PolynomialKernel_partialHessian(self, x1, x2)

    def __init__(self, *args):
        _otsvm.PolynomialKernel_swiginit(self, _otsvm.new_PolynomialKernel(*args))
    __swig_destroy__ = _otsvm.delete_PolynomialKernel

# Register PolynomialKernel in _otsvm:
_otsvm.PolynomialKernel_swigregister(PolynomialKernel)

class SigmoidKernel(SVMKernelImplementation):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def getClassName(self):
        r"""
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.SigmoidKernel_getClassName(self)

    def __repr__(self):
        return _otsvm.SigmoidKernel___repr__(self)

    def getLinear(self):
        return _otsvm.SigmoidKernel_getLinear(self)

    def setLinear(self, linear):
        return _otsvm.SigmoidKernel_setLinear(self, linear)

    def getConstant(self):
        return _otsvm.SigmoidKernel_getConstant(self)

    def setConstant(self, constant):
        return _otsvm.SigmoidKernel_setConstant(self, constant)

    def getParameters(self):
        return _otsvm.SigmoidKernel_getParameters(self)

    def setParameters(self, parameters):
        return _otsvm.SigmoidKernel_setParameters(self, parameters)

    def __call__(self, x1, x2):
        return _otsvm.SigmoidKernel___call__(self, x1, x2)

    def partialGradient(self, x1, x2):
        return _otsvm.SigmoidKernel_partialGradient(self, x1, x2)

    def partialHessian(self, x1, x2):
        return _otsvm.SigmoidKernel_partialHessian(self, x1, x2)

    def __init__(self, *args):
        _otsvm.SigmoidKernel_swiginit(self, _otsvm.new_SigmoidKernel(*args))
    __swig_destroy__ = _otsvm.delete_SigmoidKernel

# Register SigmoidKernel in _otsvm:
_otsvm.SigmoidKernel_swigregister(SigmoidKernel)

class LinearKernel(SVMKernelImplementation):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def getClassName(self):
        r"""
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.LinearKernel_getClassName(self)

    def __repr__(self):
        return _otsvm.LinearKernel___repr__(self)

    def __call__(self, x1, x2):
        return _otsvm.LinearKernel___call__(self, x1, x2)

    def partialGradient(self, x1, x2):
        return _otsvm.LinearKernel_partialGradient(self, x1, x2)

    def partialHessian(self, x1, x2):
        return _otsvm.LinearKernel_partialHessian(self, x1, x2)

    def __init__(self, *args):
        _otsvm.LinearKernel_swiginit(self, _otsvm.new_LinearKernel(*args))
    __swig_destroy__ = _otsvm.delete_LinearKernel

# Register LinearKernel in _otsvm:
_otsvm.LinearKernel_swigregister(LinearKernel)

class LibSVM(openturns.common.PersistentObject):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def getClassName(self):
        r"""
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.LibSVM_getClassName(self)
    Linear = _otsvm.LibSVM_Linear
    Polynomial = _otsvm.LibSVM_Polynomial
    Sigmoid = _otsvm.LibSVM_Sigmoid
    NormalRbf = _otsvm.LibSVM_NormalRbf
    CSupportClassification = _otsvm.LibSVM_CSupportClassification
    EpsilonSupportRegression = _otsvm.LibSVM_EpsilonSupportRegression

    def setKernelParameter(self, kernelParameter):
        return _otsvm.LibSVM_setKernelParameter(self, kernelParameter)

    def setTradeoffFactor(self, tradeoffFactor):
        return _otsvm.LibSVM_setTradeoffFactor(self, tradeoffFactor)

    def getNumberSupportVector(self):
        return _otsvm.LibSVM_getNumberSupportVector(self)

    def setModel(self, model):
        return _otsvm.LibSVM_setModel(self, model)

    def getSupportVectorCoef(self):
        return _otsvm.LibSVM_getSupportVectorCoef(self)

    def setEpsilon(self, epsilon):
        return _otsvm.LibSVM_setEpsilon(self, epsilon)

    def setGamma(self, kernel):
        return _otsvm.LibSVM_setGamma(self, kernel)

    def setNu(self, nu):
        return _otsvm.LibSVM_setNu(self, nu)

    def setP(self, p):
        return _otsvm.LibSVM_setP(self, p)

    def getKernelType(self):
        return _otsvm.LibSVM_getKernelType(self)

    def setKernelType(self, kernelType):
        return _otsvm.LibSVM_setKernelType(self, kernelType)

    def setSvmType(self, svmType):
        return _otsvm.LibSVM_setSvmType(self, svmType)

    def getSupportVector(self, dim):
        return _otsvm.LibSVM_getSupportVector(self, dim)

    def getNode(self, index):
        return _otsvm.LibSVM_getNode(self, index)

    def getConstant(self):
        return _otsvm.LibSVM_getConstant(self)

    def getGamma(self):
        return _otsvm.LibSVM_getGamma(self)

    def getDegree(self):
        return _otsvm.LibSVM_getDegree(self)

    def setDegree(self, degree):
        return _otsvm.LibSVM_setDegree(self, degree)

    def getPolynomialConstant(self):
        return _otsvm.LibSVM_getPolynomialConstant(self)

    def getOutput(self, index):
        return _otsvm.LibSVM_getOutput(self, index)

    def performTrain(self):
        return _otsvm.LibSVM_performTrain(self)

    def computeError(self):
        return _otsvm.LibSVM_computeError(self)

    def computeAccuracy(self):
        return _otsvm.LibSVM_computeAccuracy(self)

    def normalize(self, data, transformation, inverseTransformation):
        return _otsvm.LibSVM_normalize(self, data, transformation, inverseTransformation)

    def convertData(self, inputSample, outputSample):
        return _otsvm.LibSVM_convertData(self, inputSample, outputSample)

    def runCrossValidation(self):
        return _otsvm.LibSVM_runCrossValidation(self)

    def destroy(self):
        return _otsvm.LibSVM_destroy(self)

    def destroyModel(self):
        return _otsvm.LibSVM_destroyModel(self)

    def getLabel(self, vector):
        return _otsvm.LibSVM_getLabel(self, vector)

    def getLabelValues(self, vector, outC):
        return _otsvm.LibSVM_getLabelValues(self, vector, outC)

    def predict(self, inP):
        return _otsvm.LibSVM_predict(self, inP)

    def setWeight(self, weight, label):
        return _otsvm.LibSVM_setWeight(self, weight, label)

    @staticmethod
    def SVMLog(arg1):
        return _otsvm.LibSVM_SVMLog(arg1)

    def getInputTransformation(self):
        return _otsvm.LibSVM_getInputTransformation(self)

    def __init__(self, *args):
        _otsvm.LibSVM_swiginit(self, _otsvm.new_LibSVM(*args))
    __swig_destroy__ = _otsvm.delete_LibSVM

# Register LibSVM in _otsvm:
_otsvm.LibSVM_swigregister(LibSVM)

def LibSVM_SVMLog(arg1):
    return _otsvm.LibSVM_SVMLog(arg1)

class SVMRegressionImplementationdInterfaceObject(openturns.common.InterfaceObject):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _otsvm.SVMRegressionImplementationdInterfaceObject_swiginit(self, _otsvm.new_SVMRegressionImplementationdInterfaceObject(*args))

    def getImplementation(self):
        r"""
        Accessor to the underlying implementation.

        Returns
        -------
        impl : Implementation
            The implementation class.
        """
        return _otsvm.SVMRegressionImplementationdInterfaceObject_getImplementation(self)

    def setName(self, name):
        r"""
        Accessor to the object's name.

        Parameters
        ----------
        name : str
            The name of the object.
        """
        return _otsvm.SVMRegressionImplementationdInterfaceObject_setName(self, name)

    def getName(self):
        r"""
        Accessor to the object's name.

        Returns
        -------
        name : str
            The name of the object.
        """
        return _otsvm.SVMRegressionImplementationdInterfaceObject_getName(self)

    def __eq__(self, other):
        return _otsvm.SVMRegressionImplementationdInterfaceObject___eq__(self, other)

    def __ne__(self, other):
        return _otsvm.SVMRegressionImplementationdInterfaceObject___ne__(self, other)
    __swig_destroy__ = _otsvm.delete_SVMRegressionImplementationdInterfaceObject

# Register SVMRegressionImplementationdInterfaceObject in _otsvm:
_otsvm.SVMRegressionImplementationdInterfaceObject_swigregister(SVMRegressionImplementationdInterfaceObject)

class SVMRegressionImplementation(openturns.common.PersistentObject):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def getClassName(self):
        r"""
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.SVMRegressionImplementation_getClassName(self)

    def run(self):
        return _otsvm.SVMRegressionImplementation_run(self)

    def getResult(self):
        return _otsvm.SVMRegressionImplementation_getResult(self)

    def setTradeoffFactor(self, factor):
        return _otsvm.SVMRegressionImplementation_setTradeoffFactor(self, factor)

    def getTradeoffFactor(self):
        return _otsvm.SVMRegressionImplementation_getTradeoffFactor(self)

    def getKernelParameter(self):
        return _otsvm.SVMRegressionImplementation_getKernelParameter(self)

    def setKernelParameter(self, kernel):
        return _otsvm.SVMRegressionImplementation_setKernelParameter(self, kernel)

    def __init__(self, *args):
        _otsvm.SVMRegressionImplementation_swiginit(self, _otsvm.new_SVMRegressionImplementation(*args))
    __swig_destroy__ = _otsvm.delete_SVMRegressionImplementation

# Register SVMRegressionImplementation in _otsvm:
_otsvm.SVMRegressionImplementation_swigregister(SVMRegressionImplementation)

class SVMRegression(SVMRegressionImplementationdInterfaceObject):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    @staticmethod
    def GetClassName():
        return _otsvm.SVMRegression_GetClassName()

    def getClassName(self):
        return _otsvm.SVMRegression_getClassName(self)

    def setKernelParameter(self, kernel):
        return _otsvm.SVMRegression_setKernelParameter(self, kernel)

    def getKernelParameter(self):
        return _otsvm.SVMRegression_getKernelParameter(self)

    def setTradeoffFactor(self, factor):
        return _otsvm.SVMRegression_setTradeoffFactor(self, factor)

    def getTradeoffFactor(self):
        return _otsvm.SVMRegression_getTradeoffFactor(self)

    def getResult(self):
        return _otsvm.SVMRegression_getResult(self)

    def run(self):
        return _otsvm.SVMRegression_run(self)

    def __init__(self, *args):
        _otsvm.SVMRegression_swiginit(self, _otsvm.new_SVMRegression(*args))
    __swig_destroy__ = _otsvm.delete_SVMRegression

# Register SVMRegression in _otsvm:
_otsvm.SVMRegression_swigregister(SVMRegression)

def SVMRegression_GetClassName():
    return _otsvm.SVMRegression_GetClassName()

class LibSVMRegression(SVMRegressionImplementation):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def getClassName(self):
        r"""
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.LibSVMRegression_getClassName(self)

    def run(self):
        return _otsvm.LibSVMRegression_run(self)

    def getInputSample(self):
        return _otsvm.LibSVMRegression_getInputSample(self)

    def getOutputSample(self):
        return _otsvm.LibSVMRegression_getOutputSample(self)

    def __init__(self, *args):
        _otsvm.LibSVMRegression_swiginit(self, _otsvm.new_LibSVMRegression(*args))
    __swig_destroy__ = _otsvm.delete_LibSVMRegression

# Register LibSVMRegression in _otsvm:
_otsvm.LibSVMRegression_swigregister(LibSVMRegression)

class LibSVMClassification(openturns.common.PersistentObject):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def getClassName(self):
        r"""
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.LibSVMClassification_getClassName(self)

    def getAccuracy(self):
        return _otsvm.LibSVMClassification_getAccuracy(self)

    def classify(self, vector):
        return _otsvm.LibSVMClassification_classify(self, vector)

    def __repr__(self):
        return _otsvm.LibSVMClassification___repr__(self)

    def grade(self, inP, outC):
        return _otsvm.LibSVMClassification_grade(self, inP, outC)

    def predict(self, inP):
        return _otsvm.LibSVMClassification_predict(self, inP)

    def runKMeans(self, k):
        return _otsvm.LibSVMClassification_runKMeans(self, k)

    def setKernelType(self, kerneltype):
        return _otsvm.LibSVMClassification_setKernelType(self, kerneltype)

    def setTradeoffFactor(self, trade):
        return _otsvm.LibSVMClassification_setTradeoffFactor(self, trade)

    def setKernelParameter(self, kernel):
        return _otsvm.LibSVMClassification_setKernelParameter(self, kernel)

    def setWeight(self, weight):
        return _otsvm.LibSVMClassification_setWeight(self, weight)

    def run(self):
        return _otsvm.LibSVMClassification_run(self)

    def __init__(self, *args):
        _otsvm.LibSVMClassification_swiginit(self, _otsvm.new_LibSVMClassification(*args))
    __swig_destroy__ = _otsvm.delete_LibSVMClassification

# Register LibSVMClassification in _otsvm:
_otsvm.LibSVMClassification_swigregister(LibSVMClassification)

class KMeansClustering(openturns.common.PersistentObject):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def getClassName(self):
        r"""
        Accessor to the object's name.

        Returns
        -------
        class_name : str
            The object class name (`object.__class__.__name__`).
        """
        return _otsvm.KMeansClustering_getClassName(self)

    def run(self):
        return _otsvm.KMeansClustering_run(self)

    def getCluster(self):
        return _otsvm.KMeansClustering_getCluster(self)

    def getMeans(self):
        return _otsvm.KMeansClustering_getMeans(self)

    def __init__(self, *args):
        _otsvm.KMeansClustering_swiginit(self, _otsvm.new_KMeansClustering(*args))
    __swig_destroy__ = _otsvm.delete_KMeansClustering

# Register KMeansClustering in _otsvm:
_otsvm.KMeansClustering_swigregister(KMeansClustering)

class SVMKernelCollection(object):
    r"""
    Collection.

    Examples
    --------
    >>> import openturns as ot

    - Collection of **real values**:

    >>> ot.ScalarCollection(2)
    [0,0]
    >>> ot.ScalarCollection(2, 3.25)
    [3.25,3.25]
    >>> vector = ot.ScalarCollection([2.0, 1.5, 2.6])
    >>> vector
    [2,1.5,2.6]
    >>> vector[1] = 4.2
    >>> vector
    [2,4.2,2.6]
    >>> vector.add(3.8)
    >>> vector
    [2,4.2,2.6,3.8]

    - Collection of **complex values**:

    >>> ot.ComplexCollection(2)
    [(0,0),(0,0)]
    >>> ot.ComplexCollection(2, 3+4j)
    [(3,4),(3,4)]
    >>> vector = ot.ComplexCollection([2+3j, 1-4j, 3.0])
    >>> vector
    [(2,3),(1,-4),(3,0)]
    >>> vector[1] = 4+3j
    >>> vector
    [(2,3),(4,3),(3,0)]
    >>> vector.add(5+1j)
    >>> vector
    [(2,3),(4,3),(3,0),(5,1)]

    - Collection of **booleans**:

    >>> ot.BoolCollection(3)
    [0,0,0]
    >>> ot.BoolCollection(3, 1)
    [1,1,1]
    >>> vector = ot.BoolCollection([0, 1, 0])
    >>> vector
    [0,1,0]
    >>> vector[1] = 0
    >>> vector
    [0,0,0]
    >>> vector.add(1)
    >>> vector
    [0,0,0,1]

    - Collection of **distributions**:

    >>> print(ot.DistributionCollection(2))
    [Uniform(a = -1, b = 1),Uniform(a = -1, b = 1)]
    >>> print(ot.DistributionCollection(2, ot.Gamma(2.75, 1.0)))
    [Gamma(k = 2.75, lambda = 1, gamma = 0),Gamma(k = 2.75, lambda = 1, gamma = 0)]
    >>> vector = ot.DistributionCollection([ot.Normal(), ot.Uniform()])
    >>> print(vector)
    [Normal(mu = 0, sigma = 1),Uniform(a = -1, b = 1)]
    >>> vector[1] = ot.Uniform(-0.5, 1)
    >>> print(vector)
    [Normal(mu = 0, sigma = 1),Uniform(a = -0.5, b = 1)]
    >>> vector.add(ot.Gamma(2.75, 1.0))
    >>> print(vector)
    [Normal(mu = 0, sigma = 1),Uniform(a = -0.5, b = 1),Gamma(k = 2.75, lambda = 1, gamma = 0)]
    """

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __swig_destroy__ = _otsvm.delete_SVMKernelCollection

    def clear(self):
        r"""
        Reset the collection to zero dimension.

        Examples
        --------
        >>> import openturns as ot
        >>> x = ot.Point(2)
        >>> x.clear()
        >>> x
        class=Point name=Unnamed dimension=0 values=[]
        """
        return _otsvm.SVMKernelCollection_clear(self)

    def __len__(self):
        return _otsvm.SVMKernelCollection___len__(self)

    def __eq__(self, rhs):
        return _otsvm.SVMKernelCollection___eq__(self, rhs)

    def __contains__(self, val):
        return _otsvm.SVMKernelCollection___contains__(self, val)

    def __getitem__(self, i):
        return _otsvm.SVMKernelCollection___getitem__(self, i)

    def __setitem__(self, i, val):
        return _otsvm.SVMKernelCollection___setitem__(self, i, val)

    def __delitem__(self, i):
        return _otsvm.SVMKernelCollection___delitem__(self, i)

    def at(self, *args):
        r"""
        Access to an element of the collection.

        Parameters
        ----------
        index : positive int
            Position of the element to access.

        Returns
        -------
        element : type depends on the type of the collection
            Element of the collection at the position *index*.
        """
        return _otsvm.SVMKernelCollection_at(self, *args)

    def add(self, *args):
        r"""
        Append a component (in-place).

        Parameters
        ----------
        value : type depends on the type of the collection.
            The component to append.

        Examples
        --------
        >>> import openturns as ot
        >>> x = ot.Point(2)
        >>> x.add(1.)
        >>> print(x)
        [0,0,1]
        """
        return _otsvm.SVMKernelCollection_add(self, *args)

    def getSize(self):
        r"""
        Get the collection's dimension (or size).

        Returns
        -------
        n : int
            The number of components in the collection.
        """
        return _otsvm.SVMKernelCollection_getSize(self)

    def resize(self, newSize):
        r"""
        Change the size of the collection.

        Parameters
        ----------
        newSize : positive int
            New size of the collection.

        Notes
        -----
        If the new size is smaller than the older one, the last elements are thrown
        away, else the new elements are set to the default value of the element type.

        Examples
        --------
        >>> import openturns as ot
        >>> x = ot.Point(2, 4)
        >>> print(x)
        [4,4]
        >>> x.resize(1)
        >>> print(x)
        [4]
        >>> x.resize(4)
        >>> print(x)
        [4,0,0,0]
        """
        return _otsvm.SVMKernelCollection_resize(self, newSize)

    def isEmpty(self):
        r"""
        Tell if the collection is empty.

        Returns
        -------
        isEmpty : bool
            *True* if there is no element in the collection.

        Examples
        --------
        >>> import openturns as ot
        >>> x = ot.Point(2)
        >>> x.isEmpty()
        False
        >>> x.clear()
        >>> x.isEmpty()
        True
        """
        return _otsvm.SVMKernelCollection_isEmpty(self)

    def find(self, val):
        r"""
        Find the index of a given value.

        Parameters
        ----------
        val : collection value type
            The value to find

        Returns
        -------
        index : int
            The index of the first occurence of the value,
            or the size of the container if not found.
            When several values match, only the first index is returned.
        """
        return _otsvm.SVMKernelCollection_find(self, val)

    def __repr__(self):
        return _otsvm.SVMKernelCollection___repr__(self)

    def __str__(self, *args):
        return _otsvm.SVMKernelCollection___str__(self, *args)

    def __init__(self, *args):
        _otsvm.SVMKernelCollection_swiginit(self, _otsvm.new_SVMKernelCollection(*args))

# Register SVMKernelCollection in _otsvm:
_otsvm.SVMKernelCollection_swigregister(SVMKernelCollection)



