__init__
index
/home/thomapp/liquidSVM/bindings/python/liquidSVM/__init__.py

liquidSVM for Python
 
liquidSVM is a package written in C++ that
provides SVM-type solvers for various classification and regression tasks.
Because of a fully integrated hyper-parameter selection, very carefully implemented solvers,
multi-threading and GPU support,
and several built-in data decomposition strategies  it provides unprecedented speed
for small training sizes as well as for data sets of tens of millions of samples.
 
To install use
 
> pip install --user --upgrade liquidSVM
 
Then you can use it like:
 
>>> from liquidSVM import *
>>> model = mcSVM(iris, iris_labs, display=1,threads=2)
>>> result, err = model.test(iris, iris_labs)
>>> result = model.predict(iris)
 
For more information see the README and the demo notebook.
 
@author: Ingo Steinwart and Philipp Thomann

 
Modules
       
ctypes
glob
numpy
numpy.ctypeslib
os
pkg_resources
sysconfig

 
Classes
       
builtins.object
LiquidData
SVM
exSVM
lsSVM
mcSVM
nplSVM
qtSVM
rocSVM

 
class LiquidData(builtins.object)
    This class helps to organize train/test splits and targets. It has a train and a test attribute, of which each
has a data, target, and DESCR attribte as known from sklearn. This looks at several locations to find a
name.train.csv and name.test.csv. If it does then it loads or downloads it, parses it, and returns an
liquidData-object. The files also can be gzipped having names name.train.csv.gz and name.test.csv.gz.
 
Included in the package are 'banana-bc', 'banana-mc', 'covtype.1000', and 'reg-1d'.
 
Parameters
----------
name : str
    The base name of a train/test splitted data set to load.
 
Attributes
----------
name : str
    The name of the data sets
train : Bunch
    The training data set.
test : Bunch
    The test set including labels
loc : str
    The location where the data was found
 
  Methods defined here:
__init__(self, name)
Initialize self.  See help(type(self)) for accurate signature.
fromData(self, train_x, train_y, test_x, test_y)
Creates a LiquidData from given `np.array`s
 
Parameters
----------
train_x : np.array
    Train features.
train_y : np.array
    Train labels
test_x : np.array
    Test features.
test_y : np.array
    Test labels.
 
Returns
-------
LiquidData

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class SVM(builtins.object)
    The base class for all SVM learning scenarios.
This should usually not be used directly.
 
If no scenario is specified, it will be set to LS.
 
Parameters
----------
data : np.array or LiquidData or Bunch or str
    the data to train on. If it is an `np.array` then
    `labs` have to be provided as well.
    If it is an instance of `LiquidData` then data.train.data
    and data.train.target will be used and data.test will be
    automagically be tested after training and selection.
    If it is a `str` then `LiquidData(data)` will be used.
    If it is a Bunch, then `data.data` and `data.target` will be used.
labs : np.array (1-dim)
    the labels. If this is `None` then the labels
    have to be provided in the `data` argument.
**kwargs : dict
    Configuration arguments, can be `threads=1`, `display=1`, `grid_choice=1`, etc.
    For more information see: `?doc.configuration`
 
 
Attributes
----------
cookie : int
    the internal cookie of the C++ SVM
lastResult : (np.array , np.array)
    after each `test` the result and errors will be kept here.
 
  Methods defined here:
__del__(self)
__init__(self, data, labs=None, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
clean(self)
Force to release internal C++ memory. After that, this SVM cannot be used any more.
configLine(self, stage)
Internal function to get the command-line like parameters for the different stages.
 
Parameters
----------
stage : int
    
 
Returns
-------
str
get(self, name)
Gets the value of a liquidSVM-configuration parameter
For more information see: `?doc.configuration`
 
Parameters
----------
name : str
    
 
Returns
-------
predict(self, test_data, **kwargs)
Predicts labels for `test_data`.
 
Parameters
----------
test_data : np.array
    The features for which prediction should be estimated.
    
**kwargs : dict
    Passed to `liquidSVM.test`
 
Returns
-------
np.array
    the predictions for every test sample.
    It has the same number of rows as `test_data`.
    The number of columns depends on the learning scenario.
select(self, **kwargs)
Selects the best of all SVMs for all tasks/cells..
This should only be used by experts.
 
Parameters
----------
**kwargs : dict
    The command-line parameters of svm-select can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`
    For detailed information see: `?doc.selectArgs`
 
Returns
-------
np.array
    all selected validation errors and technical details of the training phase
set(self, name, value)
Sets the value of a liquidSVM-configuration parameter
For more information see: `?doc.configuration`
 
Parameters
----------
name : str
    
value : any
    This will be converted into a str, joining by spaces if needed.
 
Returns
-------
self
test(self, test_data, test_labs=None, **kwargs)
Predicts labels for `test_data` and if applicable compares to test_labs.
 
Parameters
----------
test_data : np.array or LiquidData or Bunch
    the data to predict for. If it is an `np.array` then
    `labs` have to be provided as well.
    If it is an instance of `LiquidData` then data.test.data
    and data.test.target will be used.
    If it is a Bunch, then `data.data` and `data.target` will be used.
test_labs : np.array (1-dim)
    the ground truth labels. If this is `None` and the labels
    are not provided in the `data` argument then only prediction will
    be performed.
    (Default value = None)
**kwargs : dict
    These only should be used by experts.
    The command-line parameters of svm-test can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`.
    For detailed information see: `?doc.testArgs`
 
 
Returns
-------
( np.array , np.array)
    The first return argument is an array of the results.
    The number of columns depends on the learning scenario.
    The second return argument gives the errors if labels were provided,
    or is empty else. The number of rows depends on the learning scenario.
train(self, **kwargs)
Trains all SVMs for all tasks/cells/hyper-parameters.
This should only be used by experts.
 
Parameters
----------
**kwargs :dict
    The command-line parameters of svm-train can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`
    For detailed information see: `?doc.trainArgs`
 
Returns
-------
np.array
    all validation errors and technical details of the training phase

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class exSVM(SVM)
    This class performs non-parametric, asymmetric least squares regression using SVMs. The tested estimators are
therefore estimating the conditional tau-e;xpectiles of Y given X. By default, estimators for five different tau
values are computed.
 
Parameters
----------
weights : arr of doubles
    The list of expectiles that should be estimated.
    (Default value = [0.05,0.1,0.5,0.9,0.95])
 
others: see `?SVM` and `?doc.configuration`
 
 
Method resolution order:
exSVM
SVM
builtins.object

Methods defined here:
__init__(self, data, labs=None, weights=[0.05, 0.1, 0.5, 0.9, 0.95], **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
select(self, **kwargs)
Selects the best of all SVMs for all tasks/cells..
This should only be used by experts.
 
Parameters
----------
**kwargs : dict
    The command-line parameters of svm-select can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`
    For detailed information see: `?doc.selectArgs`
 
Returns
-------
np.array
    all selected validation errors and technical details of the training phase

Methods inherited from SVM:
__del__(self)
clean(self)
Force to release internal C++ memory. After that, this SVM cannot be used any more.
configLine(self, stage)
Internal function to get the command-line like parameters for the different stages.
 
Parameters
----------
stage : int
    
 
Returns
-------
str
get(self, name)
Gets the value of a liquidSVM-configuration parameter
For more information see: `?doc.configuration`
 
Parameters
----------
name : str
    
 
Returns
-------
predict(self, test_data, **kwargs)
Predicts labels for `test_data`.
 
Parameters
----------
test_data : np.array
    The features for which prediction should be estimated.
    
**kwargs : dict
    Passed to `liquidSVM.test`
 
Returns
-------
np.array
    the predictions for every test sample.
    It has the same number of rows as `test_data`.
    The number of columns depends on the learning scenario.
set(self, name, value)
Sets the value of a liquidSVM-configuration parameter
For more information see: `?doc.configuration`
 
Parameters
----------
name : str
    
value : any
    This will be converted into a str, joining by spaces if needed.
 
Returns
-------
self
test(self, test_data, test_labs=None, **kwargs)
Predicts labels for `test_data` and if applicable compares to test_labs.
 
Parameters
----------
test_data : np.array or LiquidData or Bunch
    the data to predict for. If it is an `np.array` then
    `labs` have to be provided as well.
    If it is an instance of `LiquidData` then data.test.data
    and data.test.target will be used.
    If it is a Bunch, then `data.data` and `data.target` will be used.
test_labs : np.array (1-dim)
    the ground truth labels. If this is `None` and the labels
    are not provided in the `data` argument then only prediction will
    be performed.
    (Default value = None)
**kwargs : dict
    These only should be used by experts.
    The command-line parameters of svm-test can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`.
    For detailed information see: `?doc.testArgs`
 
 
Returns
-------
( np.array , np.array)
    The first return argument is an array of the results.
    The number of columns depends on the learning scenario.
    The second return argument gives the errors if labels were provided,
    or is empty else. The number of rows depends on the learning scenario.
train(self, **kwargs)
Trains all SVMs for all tasks/cells/hyper-parameters.
This should only be used by experts.
 
Parameters
----------
**kwargs :dict
    The command-line parameters of svm-train can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`
    For detailed information see: `?doc.trainArgs`
 
Returns
-------
np.array
    all validation errors and technical details of the training phase

Data descriptors inherited from SVM:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class lsSVM(SVM)
    This class performs non-parametric least squares regression using SVMs.
The tested estimators are therefore estimating the conditional means of Y given X.
 
Parameters
----------
see `?SVM` and `?doc.configuration`
 
 
Method resolution order:
lsSVM
SVM
builtins.object

Methods defined here:
__init__(self, data, labs=None, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.

Methods inherited from SVM:
__del__(self)
clean(self)
Force to release internal C++ memory. After that, this SVM cannot be used any more.
configLine(self, stage)
Internal function to get the command-line like parameters for the different stages.
 
Parameters
----------
stage : int
    
 
Returns
-------
str
get(self, name)
Gets the value of a liquidSVM-configuration parameter
For more information see: `?doc.configuration`
 
Parameters
----------
name : str
    
 
Returns
-------
predict(self, test_data, **kwargs)
Predicts labels for `test_data`.
 
Parameters
----------
test_data : np.array
    The features for which prediction should be estimated.
    
**kwargs : dict
    Passed to `liquidSVM.test`
 
Returns
-------
np.array
    the predictions for every test sample.
    It has the same number of rows as `test_data`.
    The number of columns depends on the learning scenario.
select(self, **kwargs)
Selects the best of all SVMs for all tasks/cells..
This should only be used by experts.
 
Parameters
----------
**kwargs : dict
    The command-line parameters of svm-select can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`
    For detailed information see: `?doc.selectArgs`
 
Returns
-------
np.array
    all selected validation errors and technical details of the training phase
set(self, name, value)
Sets the value of a liquidSVM-configuration parameter
For more information see: `?doc.configuration`
 
Parameters
----------
name : str
    
value : any
    This will be converted into a str, joining by spaces if needed.
 
Returns
-------
self
test(self, test_data, test_labs=None, **kwargs)
Predicts labels for `test_data` and if applicable compares to test_labs.
 
Parameters
----------
test_data : np.array or LiquidData or Bunch
    the data to predict for. If it is an `np.array` then
    `labs` have to be provided as well.
    If it is an instance of `LiquidData` then data.test.data
    and data.test.target will be used.
    If it is a Bunch, then `data.data` and `data.target` will be used.
test_labs : np.array (1-dim)
    the ground truth labels. If this is `None` and the labels
    are not provided in the `data` argument then only prediction will
    be performed.
    (Default value = None)
**kwargs : dict
    These only should be used by experts.
    The command-line parameters of svm-test can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`.
    For detailed information see: `?doc.testArgs`
 
 
Returns
-------
( np.array , np.array)
    The first return argument is an array of the results.
    The number of columns depends on the learning scenario.
    The second return argument gives the errors if labels were provided,
    or is empty else. The number of rows depends on the learning scenario.
train(self, **kwargs)
Trains all SVMs for all tasks/cells/hyper-parameters.
This should only be used by experts.
 
Parameters
----------
**kwargs :dict
    The command-line parameters of svm-train can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`
    For detailed information see: `?doc.trainArgs`
 
Returns
-------
np.array
    all validation errors and technical details of the training phase

Data descriptors inherited from SVM:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class mcSVM(SVM)
    This class is intended for both binary and multiclass classification.
The binary classification is treated by an SVM solver for the classical hinge loss, and
for the multiclass case, one-verus-all and all-versus-all reductions to binary classification
for the hinge and the least squares loss are provided.
The error of the very first task is the overall classification error.
 
Parameters
----------
mcType : str or int
    The multi-class classification scheme: "AvA_hinge","OvA_ls","OvA_hinge", or "AvA_ls".
 
others: see `?SVM` and `?doc.configuration`
 
 
Method resolution order:
mcSVM
SVM
builtins.object

Methods defined here:
__init__(self, data, labs=None, mcType='AvA_hinge', **kwargs)
Initialize self.  See help(type(self)) for accurate signature.

Methods inherited from SVM:
__del__(self)
clean(self)
Force to release internal C++ memory. After that, this SVM cannot be used any more.
configLine(self, stage)
Internal function to get the command-line like parameters for the different stages.
 
Parameters
----------
stage : int
    
 
Returns
-------
str
get(self, name)
Gets the value of a liquidSVM-configuration parameter
For more information see: `?doc.configuration`
 
Parameters
----------
name : str
    
 
Returns
-------
predict(self, test_data, **kwargs)
Predicts labels for `test_data`.
 
Parameters
----------
test_data : np.array
    The features for which prediction should be estimated.
    
**kwargs : dict
    Passed to `liquidSVM.test`
 
Returns
-------
np.array
    the predictions for every test sample.
    It has the same number of rows as `test_data`.
    The number of columns depends on the learning scenario.
select(self, **kwargs)
Selects the best of all SVMs for all tasks/cells..
This should only be used by experts.
 
Parameters
----------
**kwargs : dict
    The command-line parameters of svm-select can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`
    For detailed information see: `?doc.selectArgs`
 
Returns
-------
np.array
    all selected validation errors and technical details of the training phase
set(self, name, value)
Sets the value of a liquidSVM-configuration parameter
For more information see: `?doc.configuration`
 
Parameters
----------
name : str
    
value : any
    This will be converted into a str, joining by spaces if needed.
 
Returns
-------
self
test(self, test_data, test_labs=None, **kwargs)
Predicts labels for `test_data` and if applicable compares to test_labs.
 
Parameters
----------
test_data : np.array or LiquidData or Bunch
    the data to predict for. If it is an `np.array` then
    `labs` have to be provided as well.
    If it is an instance of `LiquidData` then data.test.data
    and data.test.target will be used.
    If it is a Bunch, then `data.data` and `data.target` will be used.
test_labs : np.array (1-dim)
    the ground truth labels. If this is `None` and the labels
    are not provided in the `data` argument then only prediction will
    be performed.
    (Default value = None)
**kwargs : dict
    These only should be used by experts.
    The command-line parameters of svm-test can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`.
    For detailed information see: `?doc.testArgs`
 
 
Returns
-------
( np.array , np.array)
    The first return argument is an array of the results.
    The number of columns depends on the learning scenario.
    The second return argument gives the errors if labels were provided,
    or is empty else. The number of rows depends on the learning scenario.
train(self, **kwargs)
Trains all SVMs for all tasks/cells/hyper-parameters.
This should only be used by experts.
 
Parameters
----------
**kwargs :dict
    The command-line parameters of svm-train can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`
    For detailed information see: `?doc.trainArgs`
 
Returns
-------
np.array
    all validation errors and technical details of the training phase

Data descriptors inherited from SVM:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class nplSVM(SVM)
    This class provides binary classifiers that satisfy a predefined error rate on one type of error and that
simlutaneously minimize the other type of error. For convenience some points on the ROC curve around the
predefined error rate are returned. nplNPL performs Neyman-Pearson-Learning for classification.
 
Parameters
----------
constraint : double
    The constraint around which different values should be found.
    (Default value = 0.05)
constraintFactors : arr of doubles
    The factors to multiply `constraint` with.
    (Default value = [1/2,2/3,1,3/2,2])
 
others: see `?SVM` and `?doc.configuration`
 
 
Method resolution order:
nplSVM
SVM
builtins.object

Methods defined here:
__init__(self, data, labs=None, nplClass=1, constraint=0.05, constraintFactors=[0.5, 0.6666666666666666, 1, 1.5, 2], **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
select(self, **kwargs)
Selects the best of all SVMs for all tasks/cells..
This should only be used by experts.
 
Parameters
----------
**kwargs : dict
    The command-line parameters of svm-select can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`
    For detailed information see: `?doc.selectArgs`
 
Returns
-------
np.array
    all selected validation errors and technical details of the training phase

Methods inherited from SVM:
__del__(self)
clean(self)
Force to release internal C++ memory. After that, this SVM cannot be used any more.
configLine(self, stage)
Internal function to get the command-line like parameters for the different stages.
 
Parameters
----------
stage : int
    
 
Returns
-------
str
get(self, name)
Gets the value of a liquidSVM-configuration parameter
For more information see: `?doc.configuration`
 
Parameters
----------
name : str
    
 
Returns
-------
predict(self, test_data, **kwargs)
Predicts labels for `test_data`.
 
Parameters
----------
test_data : np.array
    The features for which prediction should be estimated.
    
**kwargs : dict
    Passed to `liquidSVM.test`
 
Returns
-------
np.array
    the predictions for every test sample.
    It has the same number of rows as `test_data`.
    The number of columns depends on the learning scenario.
set(self, name, value)
Sets the value of a liquidSVM-configuration parameter
For more information see: `?doc.configuration`
 
Parameters
----------
name : str
    
value : any
    This will be converted into a str, joining by spaces if needed.
 
Returns
-------
self
test(self, test_data, test_labs=None, **kwargs)
Predicts labels for `test_data` and if applicable compares to test_labs.
 
Parameters
----------
test_data : np.array or LiquidData or Bunch
    the data to predict for. If it is an `np.array` then
    `labs` have to be provided as well.
    If it is an instance of `LiquidData` then data.test.data
    and data.test.target will be used.
    If it is a Bunch, then `data.data` and `data.target` will be used.
test_labs : np.array (1-dim)
    the ground truth labels. If this is `None` and the labels
    are not provided in the `data` argument then only prediction will
    be performed.
    (Default value = None)
**kwargs : dict
    These only should be used by experts.
    The command-line parameters of svm-test can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`.
    For detailed information see: `?doc.testArgs`
 
 
Returns
-------
( np.array , np.array)
    The first return argument is an array of the results.
    The number of columns depends on the learning scenario.
    The second return argument gives the errors if labels were provided,
    or is empty else. The number of rows depends on the learning scenario.
train(self, **kwargs)
Trains all SVMs for all tasks/cells/hyper-parameters.
This should only be used by experts.
 
Parameters
----------
**kwargs :dict
    The command-line parameters of svm-train can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`
    For detailed information see: `?doc.trainArgs`
 
Returns
-------
np.array
    all validation errors and technical details of the training phase

Data descriptors inherited from SVM:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class qtSVM(SVM)
    This class performs non-parametric and quantile regression using SVMs. The tested estimators are therefore
estimating the conditional tau-quantiles of Y given X. By default, estimators for five different tau values are
computed.
 
Parameters
----------
weights : arr of doubles
    The list of quantiles that should be estimated.
    (Default value = [0.05,0.1,0.5,0.9,0.95])
 
others: see `?SVM` and `?doc.configuration`
 
 
Method resolution order:
qtSVM
SVM
builtins.object

Methods defined here:
__init__(self, data, labs=None, weights=[0.05, 0.1, 0.5, 0.9, 0.95], **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
select(self, **kwargs)
Selects the best of all SVMs for all tasks/cells..
This should only be used by experts.
 
Parameters
----------
**kwargs : dict
    The command-line parameters of svm-select can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`
    For detailed information see: `?doc.selectArgs`
 
Returns
-------
np.array
    all selected validation errors and technical details of the training phase

Methods inherited from SVM:
__del__(self)
clean(self)
Force to release internal C++ memory. After that, this SVM cannot be used any more.
configLine(self, stage)
Internal function to get the command-line like parameters for the different stages.
 
Parameters
----------
stage : int
    
 
Returns
-------
str
get(self, name)
Gets the value of a liquidSVM-configuration parameter
For more information see: `?doc.configuration`
 
Parameters
----------
name : str
    
 
Returns
-------
predict(self, test_data, **kwargs)
Predicts labels for `test_data`.
 
Parameters
----------
test_data : np.array
    The features for which prediction should be estimated.
    
**kwargs : dict
    Passed to `liquidSVM.test`
 
Returns
-------
np.array
    the predictions for every test sample.
    It has the same number of rows as `test_data`.
    The number of columns depends on the learning scenario.
set(self, name, value)
Sets the value of a liquidSVM-configuration parameter
For more information see: `?doc.configuration`
 
Parameters
----------
name : str
    
value : any
    This will be converted into a str, joining by spaces if needed.
 
Returns
-------
self
test(self, test_data, test_labs=None, **kwargs)
Predicts labels for `test_data` and if applicable compares to test_labs.
 
Parameters
----------
test_data : np.array or LiquidData or Bunch
    the data to predict for. If it is an `np.array` then
    `labs` have to be provided as well.
    If it is an instance of `LiquidData` then data.test.data
    and data.test.target will be used.
    If it is a Bunch, then `data.data` and `data.target` will be used.
test_labs : np.array (1-dim)
    the ground truth labels. If this is `None` and the labels
    are not provided in the `data` argument then only prediction will
    be performed.
    (Default value = None)
**kwargs : dict
    These only should be used by experts.
    The command-line parameters of svm-test can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`.
    For detailed information see: `?doc.testArgs`
 
 
Returns
-------
( np.array , np.array)
    The first return argument is an array of the results.
    The number of columns depends on the learning scenario.
    The second return argument gives the errors if labels were provided,
    or is empty else. The number of rows depends on the learning scenario.
train(self, **kwargs)
Trains all SVMs for all tasks/cells/hyper-parameters.
This should only be used by experts.
 
Parameters
----------
**kwargs :dict
    The command-line parameters of svm-train can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`
    For detailed information see: `?doc.trainArgs`
 
Returns
-------
np.array
    all validation errors and technical details of the training phase

Data descriptors inherited from SVM:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class rocSVM(SVM)
    This class provides several points on the ROC curve by solving multiple weighted binary classification problems.
It is only suitable to binary classification data.
 
Parameters
----------
weightsteps : int
    The number of weights that should be used.
    (Default value = 9)
 
others: see `?SVM` and `?doc.configuration`
 
 
Method resolution order:
rocSVM
SVM
builtins.object

Methods defined here:
__init__(self, data, labs=None, weightsteps=9, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
select(self, **kwargs)
Selects the best of all SVMs for all tasks/cells..
This should only be used by experts.
 
Parameters
----------
**kwargs : dict
    The command-line parameters of svm-select can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`
    For detailed information see: `?doc.selectArgs`
 
Returns
-------
np.array
    all selected validation errors and technical details of the training phase

Methods inherited from SVM:
__del__(self)
clean(self)
Force to release internal C++ memory. After that, this SVM cannot be used any more.
configLine(self, stage)
Internal function to get the command-line like parameters for the different stages.
 
Parameters
----------
stage : int
    
 
Returns
-------
str
get(self, name)
Gets the value of a liquidSVM-configuration parameter
For more information see: `?doc.configuration`
 
Parameters
----------
name : str
    
 
Returns
-------
predict(self, test_data, **kwargs)
Predicts labels for `test_data`.
 
Parameters
----------
test_data : np.array
    The features for which prediction should be estimated.
    
**kwargs : dict
    Passed to `liquidSVM.test`
 
Returns
-------
np.array
    the predictions for every test sample.
    It has the same number of rows as `test_data`.
    The number of columns depends on the learning scenario.
set(self, name, value)
Sets the value of a liquidSVM-configuration parameter
For more information see: `?doc.configuration`
 
Parameters
----------
name : str
    
value : any
    This will be converted into a str, joining by spaces if needed.
 
Returns
-------
self
test(self, test_data, test_labs=None, **kwargs)
Predicts labels for `test_data` and if applicable compares to test_labs.
 
Parameters
----------
test_data : np.array or LiquidData or Bunch
    the data to predict for. If it is an `np.array` then
    `labs` have to be provided as well.
    If it is an instance of `LiquidData` then data.test.data
    and data.test.target will be used.
    If it is a Bunch, then `data.data` and `data.target` will be used.
test_labs : np.array (1-dim)
    the ground truth labels. If this is `None` and the labels
    are not provided in the `data` argument then only prediction will
    be performed.
    (Default value = None)
**kwargs : dict
    These only should be used by experts.
    The command-line parameters of svm-test can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`.
    For detailed information see: `?doc.testArgs`
 
 
Returns
-------
( np.array , np.array)
    The first return argument is an array of the results.
    The number of columns depends on the learning scenario.
    The second return argument gives the errors if labels were provided,
    or is empty else. The number of rows depends on the learning scenario.
train(self, **kwargs)
Trains all SVMs for all tasks/cells/hyper-parameters.
This should only be used by experts.
 
Parameters
----------
**kwargs :dict
    The command-line parameters of svm-train can be given here
    in dictionary form, e.g. `d=1` instead of `-d 1`
    For detailed information see: `?doc.trainArgs`
 
Returns
-------
np.array
    all validation errors and technical details of the training phase

Data descriptors inherited from SVM:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Data
        __all__ = ['SVM', 'lsSVM', 'mcSVM', 'qtSVM', 'exSVM', 'nplSVM', 'rocSVM', 'iris', 'iris_labs', 'LiquidData', 'doc']
__warningregistry__ = {'version': 8, ('SO is deprecated, use EXT_SUFFIX', <class 'DeprecationWarning'>, 69): True}
iris = array([[ 5.1, 4.9, 4.7, 4.6], [ 5. , ...3, 2.5, 2.3], [ 1.9, 2. , 2.3, 1.8]])
iris_labs = array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,...3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3])