SVMClassification

class otsvm.SVMClassification(*args)

Classification algorithm using LibSVM.

Methods

classify(vector)

Classify points according to the classifier.

getClassName()

Accessor to the object's name.

getDimension()

Accessor to the dimension.

getId()

Accessor to the object's id.

getName()

Accessor to the object's name.

getNumberOfClasses()

Accessor to the number of classes.

getShadowedId()

Accessor to the object's shadowed id.

getVisibility()

Accessor to the object's visibility state.

grade(inP, outC)

Grade points according to the classifier.

hasName()

Test if the object is named.

hasVisibleName()

Test if the object has a distinguishable name.

isParallel()

Accessor to the parallel flag.

setName(name)

Accessor to the object's name.

setParallel(flag)

Accessor to the parallel flag.

setShadowedId(id)

Accessor to the object's shadowed id.

setVisibility(visible)

Accessor to the object's visibility state.

getAccuracy

getVerbose

predict

run

runKMeans

setKernelParameter

setKernelType

setTradeoffFactor

setVerbose

setWeight

__init__(*args)
classify(vector)

Classify points according to the classifier.

Parameters:
inputsequence of float or 2-d a sequence of float

A point or set of points to classify.

Returns:
clsint or Indices

The class index of the input points, or indices of the classes of each points.

getClassName()

Accessor to the object’s name.

Returns:
class_namestr

The object class name (object.__class__.__name__).

getDimension()

Accessor to the dimension.

Returns:
dimint

The dimension of the classifier.

getId()

Accessor to the object’s id.

Returns:
idint

Internal unique identifier.

getName()

Accessor to the object’s name.

Returns:
namestr

The name of the object.

getNumberOfClasses()

Accessor to the number of classes.

Returns:
n_classesint

The number of classes

getShadowedId()

Accessor to the object’s shadowed id.

Returns:
idint

Internal unique identifier.

getVisibility()

Accessor to the object’s visibility state.

Returns:
visiblebool

Visibility flag.

grade(inP, outC)

Grade points according to the classifier.

Parameters:
inputPointsequence of float or 2-d a sequence of float

A point or set of points to grade.

kint or sequence of int

The class index, or class indices.

Returns:
gradefloat or Point

Grade or list of grades of each input point with respect to each class index

hasName()

Test if the object is named.

Returns:
hasNamebool

True if the name is not empty.

hasVisibleName()

Test if the object has a distinguishable name.

Returns:
hasVisibleNamebool

True if the name is not empty and not the default one.

isParallel()

Accessor to the parallel flag.

Returns:
flagbool

Logical value telling if the parallel mode has been activated.

setName(name)

Accessor to the object’s name.

Parameters:
namestr

The name of the object.

setParallel(flag)

Accessor to the parallel flag.

Parameters:
flagbool

Logical value telling if the classification and grading are done in parallel.

setShadowedId(id)

Accessor to the object’s shadowed id.

Parameters:
idint

Internal unique identifier.

setVisibility(visible)

Accessor to the object’s visibility state.

Parameters:
visiblebool

Visibility flag.