Marsyas  0.5.0-beta1
Public Member Functions
KNNClassifier Class Reference

Single KNN multidimensional classifier. More...

#include <KNNClassifier.h>

Inherits MarSystem.

Public Member Functions

MarSystemclone () const
 KNNClassifier (std::string name)
void myProcess (realvec &in, realvec &out)
 Processes data.
 ~KNNClassifier ()

Detailed Description

Single KNN multidimensional classifier.

Simple multidimensional KNN classifier. The classifier parameters (or model) are stored in the the theta control. When the mode control is set to "train" the input slice is used to accumulate information for training. The actual final theta calculation is completed when the control train is set to true. That can accomodate non-incremental or batch training. The labels control is used to provide ground truth about the label(s). The output of the classifier is the ground truth label(s) when the mode control is train.

When the mode control is set to "predict" then the output of the classifier is the predicted labels using the trained parameter vector theta.

This MarSystems serves as a prototypical classification/regression MarSystem.

Definition at line 50 of file KNNClassifier.h.

Constructor & Destructor Documentation

KNNClassifier ( std::string  name)

Definition at line 25 of file KNNClassifier.cpp.

Definition at line 32 of file KNNClassifier.cpp.

Member Function Documentation

MarSystem * clone ( ) const [virtual]

Implements MarSystem.

Definition at line 38 of file KNNClassifier.cpp.

void myProcess ( realvec in,
realvec out 
) [virtual]

Processes data.

inInput data to read.
outOutput data to write.

Implement this method in subclass to define specific data processing.

Implements MarSystem.

Definition at line 107 of file KNNClassifier.cpp.

The documentation for this class was generated from the following files: