SimpleSVM#

class pyopenms.SimpleSVM#

Bases: object

Cython implementation of _SimpleSVM

Original C++ documentation is available here

– Inherits from [‘DefaultParamHandler’]

__init__()#

Overload:

__init__(self) None

Overload:

__init__(self, in_0: SimpleSVM) None

Methods

__init__

Overload:

getDefaults(self)

Returns the default parameters

getFeatureWeights(self, feature_weights)

Returns the weights used for features (predictors) in the SVM model

getName(self)

Returns the name

getParameters(self)

Returns the parameters

getSubsections(self)

predict(self, predictions, indexes)

Predict class labels (and probabilities)

setName(self, in_0)

Sets the name

setParameters(self, param)

Sets the parameters

writeXvalResults(self, path)

getDefaults(self) Param#

Returns the default parameters

getFeatureWeights(self, feature_weights: Dict[bytes | str | String, float]) None#

Returns the weights used for features (predictors) in the SVM model

Currently only supported for two-class classification If a linear kernel is used, the weights are informative for ranking features

getName(self) bytes | str | String#

Returns the name

getParameters(self) Param#

Returns the parameters

getSubsections(self) List[bytes]#
predict(self, predictions: List[SVMPrediction], indexes: List[int]) None#

Predict class labels (and probabilities)

Parameters:
  • predictions – Output vector of prediction results (same order as ``)

  • indexes – Vector of observation indexes for which predictions are desired. If empty (default), predictions are made for all observations

setName(self, in_0: bytes | str | String) None#

Sets the name

setParameters(self, param: Param) None#

Sets the parameters

writeXvalResults(self, path: bytes | str | String) None#