Classifier

class Classifier(*args)

Classifier.

Available constructors:

Classifier(classifierImp)

Parameters
classifierImpclassifier implementation

A classifier implementation. It can be a MixtureClassifier.

Notes

The classifier enables to define rules that assign a vector to a particular class.

Methods

classify(self, \*args)

Classify points according to the classifier.

getClassName(self)

Accessor to the object’s name.

getDimension(self)

Accessor to the dimension.

getId(self)

Accessor to the object’s id.

getImplementation(self, \*args)

Accessor to the underlying implementation.

getName(self)

Accessor to the object’s name.

getNumberOfClasses(self)

Accessor to the number of classes.

getVerbose(self)

Accessor to the verbosity.

grade(self, \*args)

Grade points according to the classifier.

isParallel(self)

Accessor to the parallel flag.

setName(self, name)

Accessor to the object’s name.

setParallel(self, flag)

Accessor to the parallel flag.

setVerbose(self, verbose)

Accessor to the verbosity.

__init__(self, *args)

Initialize self. See help(type(self)) for accurate signature.

classify(self, *args)

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(self)

Accessor to the object’s name.

Returns
class_namestr

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

getDimension(self)

Accessor to the dimension.

Returns
dimint

The dimension of the classifier.

getId(self)

Accessor to the object’s id.

Returns
idint

Internal unique identifier.

getImplementation(self, *args)

Accessor to the underlying implementation.

Returns
implImplementation

The implementation class.

getName(self)

Accessor to the object’s name.

Returns
namestr

The name of the object.

getNumberOfClasses(self)

Accessor to the number of classes.

Returns
n_classesint

The number of classes

getVerbose(self)

Accessor to the verbosity.

Returns
verbbool

Logical value telling if the verbose mode has been activated.

grade(self, *args)

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

isParallel(self)

Accessor to the parallel flag.

Returns
flagbool

Logical value telling if the parallel mode has been activated.

setName(self, name)

Accessor to the object’s name.

Parameters
namestr

The name of the object.

setParallel(self, flag)

Accessor to the parallel flag.

Parameters
flagbool

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

setVerbose(self, verbose)

Accessor to the verbosity.

Parameters
verbbool

Logical value telling if the verbose mode has been activated.