Public Member Functions | Public Attributes | List of all members
ml_classifiers::NearestNeighborClassifier Class Reference

#include <nearest_neighbor_classifier.hpp>

Inheritance diagram for ml_classifiers::NearestNeighborClassifier:
Inheritance graph
[legend]

Public Member Functions

void addTrainingPoint (std::string target_class, const std::vector< double > point)
 
std::string classifyPoint (const std::vector< double > point)
 
void clear ()
 
bool load (const std::string filename)
 
 NearestNeighborClassifier ()
 
void save (const std::string filename)
 
void train ()
 
 ~NearestNeighborClassifier ()
 
- Public Member Functions inherited from ml_classifiers::Classifier
 Classifier ()
 
virtual ~Classifier ()
 

Public Attributes

ClassMap class_data
 

Detailed Description

Definition at line 49 of file nearest_neighbor_classifier.hpp.

Constructor & Destructor Documentation

◆ NearestNeighborClassifier()

ml_classifiers::NearestNeighborClassifier::NearestNeighborClassifier ( )

Definition at line 45 of file nearest_neighbor_classifier.cpp.

◆ ~NearestNeighborClassifier()

ml_classifiers::NearestNeighborClassifier::~NearestNeighborClassifier ( )

Definition at line 47 of file nearest_neighbor_classifier.cpp.

Member Function Documentation

◆ addTrainingPoint()

void ml_classifiers::NearestNeighborClassifier::addTrainingPoint ( std::string  target_class,
const std::vector< double >  point 
)
virtual

Implements ml_classifiers::Classifier.

Definition at line 56 of file nearest_neighbor_classifier.cpp.

◆ classifyPoint()

std::string ml_classifiers::NearestNeighborClassifier::classifyPoint ( const std::vector< double >  point)
virtual

Implements ml_classifiers::Classifier.

Definition at line 69 of file nearest_neighbor_classifier.cpp.

◆ clear()

void ml_classifiers::NearestNeighborClassifier::clear ( )
virtual

Implements ml_classifiers::Classifier.

Definition at line 64 of file nearest_neighbor_classifier.cpp.

◆ load()

bool ml_classifiers::NearestNeighborClassifier::load ( const std::string  filename)
virtual

Implements ml_classifiers::Classifier.

Definition at line 51 of file nearest_neighbor_classifier.cpp.

◆ save()

void ml_classifiers::NearestNeighborClassifier::save ( const std::string  filename)
virtual

Implements ml_classifiers::Classifier.

Definition at line 49 of file nearest_neighbor_classifier.cpp.

◆ train()

void ml_classifiers::NearestNeighborClassifier::train ( )
virtual

Implements ml_classifiers::Classifier.

Definition at line 62 of file nearest_neighbor_classifier.cpp.

Member Data Documentation

◆ class_data

ClassMap ml_classifiers::NearestNeighborClassifier::class_data

Definition at line 52 of file nearest_neighbor_classifier.hpp.


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


ml_classifiers
Author(s): Scott Niekum , Joshua Whitley
autogenerated on Mon Feb 28 2022 22:46:49