summaryrefslogtreecommitdiffstats
path: root/ml/kmeans/KMeans.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:05 +0000
commit97e01009d69b8fbebfebf68f51e3d126d0ed43fc (patch)
tree02e8b836c3a9d89806f3e67d4a5fe9f52dbb0061 /ml/kmeans/KMeans.h
parentReleasing debian version 1.36.1-1. (diff)
downloadnetdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.tar.xz
netdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.zip
Merging upstream version 1.37.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ml/kmeans/KMeans.h')
-rw-r--r--ml/kmeans/KMeans.h34
1 files changed, 0 insertions, 34 deletions
diff --git a/ml/kmeans/KMeans.h b/ml/kmeans/KMeans.h
deleted file mode 100644
index 4ea3b6a89..000000000
--- a/ml/kmeans/KMeans.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// SPDX-License-Identifier: GPL-3.0-or-later
-
-#ifndef KMEANS_H
-#define KMEANS_H
-
-#include <atomic>
-#include <vector>
-#include <limits>
-#include <mutex>
-
-#include "SamplesBuffer.h"
-
-class KMeans {
-public:
- KMeans(size_t NumClusters = 2) : NumClusters(NumClusters) {
- MinDist = std::numeric_limits<CalculatedNumber>::max();
- MaxDist = std::numeric_limits<CalculatedNumber>::min();
- };
-
- void train(SamplesBuffer &SB, size_t MaxIterations);
- CalculatedNumber anomalyScore(SamplesBuffer &SB);
-
-private:
- size_t NumClusters;
-
- std::vector<DSample> ClusterCenters;
-
- CalculatedNumber MinDist;
- CalculatedNumber MaxDist;
-
- std::mutex Mutex;
-};
-
-#endif /* KMEANS_H */