Documentation ¶
Overview ¶
Package silhouette implements the silhouette cluster analysis algorithm See: https://en.wikipedia.org/wiki/Silhouette_(clustering)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EstimateK ¶
func EstimateK(data clusters.Observations, kmax int, m Partitioner) (int, float64, error)
EstimateK estimates the amount of clusters (k) along with the silhouette score for that value, using the given partitioning algorithm
func Score ¶
func Score(data clusters.Observations, k int, m Partitioner) (float64, error)
Score calculates the silhouette score for a given value of k, using the given partitioning algorithm
Types ¶
type KScore ¶
KScore holds the score for a value of K
func Scores ¶
func Scores(data clusters.Observations, kmax int, m Partitioner) ([]KScore, error)
Scores calculates the silhouette scores for all values of k between 2 and kmax, using the given partitioning algorithm
type Partitioner ¶
type Partitioner interface {
Partition(data clusters.Observations, k int) (clusters.Clusters, error)
}
Partitioner interface which suitable clustering algorithms should implement
Click to show internal directories.
Click to hide internal directories.