K-Nearest Neighbours Algorithm.
More...
#include <KNN.h>
|
| neighVector | run (const Descriptor &individual, const vector< Descriptor > &neighbours, Distance< float > *metric, const int &k=3) |
| | Computes the KNN algorithm for the individual Returns the k nearest neighbours Ss in a vector. More...
|
| |
| neighMatrix | run (const vector< Descriptor > &population, Distance< float > *metric, const int &k=3) |
| | Computes the KNN for the entire vector of individuals given. More...
|
| |
K-Nearest Neighbours Algorithm.
◆ run() [1/2]
| neighVector KNN::run |
( |
const Descriptor & |
individual, |
|
|
const vector< Descriptor > & |
neighbours, |
|
|
Distance< float > * |
metric, |
|
|
const int & |
k = 3 |
|
) |
| |
Computes the KNN algorithm for the individual Returns the k nearest neighbours Ss in a vector.
- Template Parameters
-
- Parameters
-
| individual | |
| neighbours | |
| metric | |
| k | |
- Returns
- vector
◆ run() [2/2]
| neighMatrix KNN::run |
( |
const vector< Descriptor > & |
population, |
|
|
Distance< float > * |
metric, |
|
|
const int & |
k = 3 |
|
) |
| |
Computes the KNN for the entire vector of individuals given.
- Template Parameters
-
- Parameters
-
- Returns
- neighMatrix<T>
The documentation for this class was generated from the following files:
- include/dignea/utilities/KNN.h
- src/dignea/utilities/KNN.cpp