NeuralEngine A Game Engine with embeded Machine Learning algorithms based on Gaussian Processes. |

FgKMeans.h
1
11#pragma once
12
13#include <NeMachineLearningLib.h>
14#include <MachineLearning/CommonUtil.h>
15
16 namespace NeuralEngine
17{
18 namespace MachineLearning
19 {
69 template<typename Scalar>
70 class NE_IMPEXP KMeans
71 {
72 public:
73
85 static void Compute(af::array& means, af::array& clusters, const af::array& in, int k, int iter = 100);
86
87 private:
88
99 static af::array Clusterize(const af::array& data, const af::array& means);
100
112 static af::array NewMeans(af::array data, af::array clusters, int k);
113
124 static af::array Distance(const af::array& data, const af::array& means);
125 };
126 }
127}
NeuralEngine::MachineLearning::KMeans
KMeans cluster.
Definition: FgKMeans.h:71
NeuralEngine::MachineLearning::KMeans::Clusterize
static af::array Clusterize(const af::array &data, const af::array &means)
Associates data to computed means.
NeuralEngine::MachineLearning::KMeans::Distance
static af::array Distance(const af::array &data, const af::array &means)
Euclidian distance.
NeuralEngine::MachineLearning::KMeans::Compute
static void Compute(af::array &means, af::array &clusters, const af::array &in, int k, int iter=100)
Computes k means and cluster.
NeuralEngine::MachineLearning::KMeans::NewMeans
static af::array NewMeans(af::array data, af::array clusters, int k)
Creates a new means.
NeuralEngine
Definition: NeArray2.h:18