nk 1.0.0
C++ Numerical Computing Runtime
Loading...
Searching...
No Matches
silhouette.hpp
Go to the documentation of this file.
1
3// toolboxes/stats/include/nk/stats/cluster/silhouette.hpp
4//
5// Silhouette coefficient — cluster-validity score per point.
6
7#pragma once
8
9#include <memory_resource>
10#include <nk/value/value.hpp>
11
12#include <string>
13
14namespace nk::stats {
15
18
19
38Value silhouette(const Value &X, const Value &clust,
39 const std::string &metric = "sqeuclidean", double p = 2.0,
40 std::pmr::memory_resource *mr = nullptr);
41
42
44} // namespace nk::stats
Core MATLAB-compatible multidimensional array and scalar value type.
Definition value.hpp:61
Value silhouette(const Value &X, const Value &clust, const std::string &metric="sqeuclidean", double p=2.0, std::pmr::memory_resource *mr=nullptr)
Per-point silhouette coefficient (s = silhouette(X, clust, metric, p)).