14 #include <dignea/core/Solution.h>
15 #include <dignea/distances/Distance.h>
16 #include <dignea/searches/NoveltySearch.h>
67 using Descriptor = vector<float>;
75 virtual ~
KNN() =
default;
78 const vector<Descriptor> &neighbours,
81 neighMatrix run(
const vector<Descriptor> &population,
97 vector<float>
sparseness(
const vector<Descriptor> &population,
vector< neighVector > neighMatrix
Data type which represents a matrix of close neighbours. The first value is the index of the neighbou...
Definition: KNN.h:65
vector< float > sparseness(const vector< Descriptor > &population, Distance< float > *metric, const int k)
Computes the sparseness of all individuals in the population vector Based on the Novelty Search from ...
Definition: KNN.cpp:81
pair< float, int > neighborT
Data type which represents a close neighbours. The first value is the distance to the individual The ...
Definition: KNN.h:33
vector< neighborT > neighVector
Vector of neighbours Each element is of type neighborT. [(Distance_to_other_0, other_index_0),...
Definition: KNN.h:44
K-Nearest Neighbours Algorithm.
Definition: KNN.h:71