Classifier

class Classifier(*args)

Classifier.

Available constructors:
Classifier(classifierImp)
Parameters:

classifierImp : classifier 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(*args) 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.
getImplementation(*args) Accessor to the underlying implementation.
getName() Accessor to the object’s name.
getVerbose() Accessor to the verbosity.
grade(*args) Grade points according to the classifier.
isParallel() Accessor to the parallel flag.
setName(name) Accessor to the object’s name.
setParallel(flag) Accessor to the parallel flag.
setVerbose(verbose) Accessor to the verbosity.
__init__(*args)
classify(*args)

Classify points according to the classifier.

Available usages:

classify(inputPoint)

classify(inputSample)

Parameters:

inputPoint : sequence of float

A point to classify.

inputSample : 2-d a sequence of float

A set of point to classify.

Notes

The rules to assign a point to a class are specific to each classifierImp.

In the first usage, it returns an integer which corresponds to the class where inputPoint has been assigned.

In the second usage, it returns an Indices that collects the class of each point of inputSample.

getClassName()

Accessor to the object’s name.

Returns:

class_name : str

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

getDimension()

Accessor to the dimension.

Returns:

dim : integer

The dimension of the classifier.

getId()

Accessor to the object’s id.

Returns:

id : int

Internal unique identifier.

getImplementation(*args)

Accessor to the underlying implementation.

Returns:

impl : Implementation

The implementation class.

getName()

Accessor to the object’s name.

Returns:

name : str

The name of the object.

getVerbose()

Accessor to the verbosity.

Returns:

verb : bool

Logical value telling if the verbose mode has been activated.

grade(*args)

Grade points according to the classifier.

Available usages:

grade(inputPoint, k)

grade(inputSample, classList)

Parameters:

inputPoint : sequence of float

A point to grade.

inputSample : 2-d a sequence of float

A set of point to grade.

k : integer

The class number.

classList : sequence of integer

The list of class number.

Notes

The rules to grade a point with respect to a class are specific to each classifierImp.

In the first usage, it returns a real that grades inputPoint with respect to the class k. The greatest, the best.

In the second usage, it returns an Indices that collects the grades of the i^{th} point of inputSample with respect to the i^{th} class of classList.

isParallel()

Accessor to the parallel flag.

Returns:

flag : bool

Logical value telling if the parallel mode has been activated.

setName(name)

Accessor to the object’s name.

Parameters:

name : str

The name of the object.

setParallel(flag)

Accessor to the parallel flag.

Parameters:

flag : bool

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

setVerbose(verbose)

Accessor to the verbosity.

Parameters:

verb : bool

Logical value telling if the verbose mode has been activated.