Developer Documentation
RAVL, Recognition And Vision Library
USER HOME PAGE CLASS LIST CONTENTS
Ravl - Pattern Recognition - Classify - ClassifyKNearestNeighbourC
 

  PUBLIC
ClassifyKNearestNeighbourC::ClassifyKNearestNeighbourC(const DataSet2C &,UIntT,const DistanceC &)
ClassifyKNearestNeighbourC::ClassifyKNearestNeighbourC(ClassifyKNearestNeighbourBodyC &)
ClassifyKNearestNeighbourC::Body(void)
ClassifyKNearestNeighbourC::Body(void) const
ClassifyKNearestNeighbourC::Search(const VectorC &,UIntT)
ClassifyKNearestNeighbourC::K(void) const
ClassifyVectorC::Body(void)
ClassifyVectorC::Body(void) const
ClassifyVectorC::Classify(const VectorC &) const
ClassifyVectorC::Confidence(const VectorC &) const
ClassifyVectorC::Labels(void) const
RCHandleC::operator =(const RCHandleC &)
RCHandleC::DeepCopy(UIntT) const
RCHandleC::operator ==(const RCHandleC &) const
RCHandleC::operator !=(const RCHandleC &) const
RCHandleC::Hash(void) const
RCHandleC::IsValid(void) const
RCHandleC::Invalidate(void)
RCHandleC::IsHandleType(const DT &) const
RCHandleC::CheckHandleType(const DT &) const
RCHandleC::Body(void)
RCHandleC::Body(void) const
RCHandleC::References(void) const
RCHandleC::operator <<(ostream &,const RCHandleC &)
RCHandleC::operator >>(istream &,RCHandleC &)

   ClassifyKNearestNeighbourC   
 
k nearest neighbours classifier.
 
include "Ravl/PatternRec/ClassifyKNearestNeighbour.hh"
Source file:Ravl/PatternRec/Classify/ClassifyKNearestNeighbour.hh
User Level:Normal
Library:RavlPatternRec
In Scope:RavlN

Comments:
Classify probe vector as the most common amoung its k nearest neighbours. If there's a conflict the label with the smallest average distance is used.

Parent Classes: Derived Classes: Methods:
ClassifyKNearestNeighbourC(const DataSet2C<SampleVectorC,SampleLabelC> & data,UIntT defaultK = 5,const DistanceC & xdistMetric = DistanceSqrEuclideanC ())
Constructor.

ClassifyKNearestNeighbourC(ClassifyKNearestNeighbourBodyC & bod)
Body constructor.

ClassifyKNearestNeighbourBodyC & Body()
Access body.

const ClassifyKNearestNeighbourBodyC & Body() const
Access body.

SArray1dC<Tuple2C<UIntT,RealT>> Search(const VectorC & ex,UIntT k)
Search for the the 'k' nearest neighbours.
Returns the label and the distance for the 'k' nearest neighbours.

UIntT K() const
Number of samples to use when classifying.

#include "Ravl/PatternRec/ClassifyVector.hh"
ClassifyVectorBodyC & Body()
Access body.

const ClassifyVectorBodyC & Body() const
Access body.

UIntT Classify(const VectorC & data) const
Classify vector 'data' return the most likely label.

VectorC Confidence(const VectorC & data) const
Estimate the confidence for each label.
The meaning of the confidence assigned to each label depends on the classifier used. The higher the confidence the more likely it is the label is correct.

UIntT Labels() const
Returns the maximum number of output labels.

#include "Ravl/RefCounter.hh"
const RCHandleC<ClassifyVectorBodyC> & operator =(const RCHandleC<ClassifyVectorBodyC> & oth)
Assign handle.

RCHandleC<ClassifyVectorBodyC> DeepCopy(UIntT levels = ((UIntT))) const
Do a deep copy of the object.

bool operator ==(const RCHandleC<ClassifyVectorBodyC> & oth) const
Are handles to the same object ?

bool operator !=(const RCHandleC<ClassifyVectorBodyC> & oth) const
Are handles to different objects ?

UIntT Hash() const
Default hash function.
This hashes on the address of the body.

bool IsValid() const
Test if this is a valid handle.

void Invalidate()
Invalidate this handle.
Unattaches the body from the handle.

bool IsHandleType(const DT &) const
Is handle of given type ?

void CheckHandleType(const DT & dummy) const
Check handle type. Throw an expception if not.

ClassifyVectorBodyC & Body()
Access body of object.

const ClassifyVectorBodyC & Body() const
Constant access to body of object.

UIntT References() const
Find the number of references to the body of this object.

ostream & operator <<(ostream & strm,const RCHandleC<ClassifyVectorBodyC> & obj)

istream & operator >>(istream & strm,RCHandleC<ClassifyVectorBodyC> & obj)


Maintainer:Charles Galambos, Documentation by CxxDoc: Tue Aug 13 09:59:30 2002