12 #ifndef MLPACK_CORE_CV_METRICS_SILHOUETTE_SCORE_HPP 13 #define MLPACK_CORE_CV_METRICS_SILHOUETTE_SCORE_HPP 51 template<
typename DataType,
typename Metric>
52 static double Overall(
const DataType& X,
53 const arma::Row<size_t>& labels,
54 const Metric& metric);
63 template<
typename DataType>
64 static arma::rowvec
SamplesScore(
const DataType& distances,
65 const arma::Row<size_t>& labels);
76 template<
typename DataType,
typename Metric>
78 const arma::Row<size_t>& labels,
79 const Metric& metric);
91 const arma::Row<size_t>& labels,
93 const bool& sameCluster =
false);
106 #include "silhouette_score_impl.hpp" static const bool NeedsMinimization
Information for hyper-parameter tuning code.
Linear algebra utility functions, generally performed on matrices or vectors.
static double Overall(const DataType &X, const arma::Row< size_t > &labels, const Metric &metric)
Find the overall silhouette score.
static arma::rowvec SamplesScore(const DataType &distances, const arma::Row< size_t > &labels)
Find the individual silhouette scores for precomputted dissimilarites.
Include all of the base components required to write mlpack methods, and the main mlpack Doxygen docu...
static double MeanDistanceFromCluster(const arma::colvec &distances, const arma::Row< size_t > &labels, const size_t &label, const bool &sameCluster=false)
Find mean distance of element from a given cluster.
The Silhouette Score is a metric of performance for clustering that represents the quality of cluster...