Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
clusters
✓ github.com/muesli/clusters
Performs K-means clustering on a set of 2D points.
package main
import (
"fmt"
"github.com/muesli/clusters"
)
func main() {
data := clusters.Observations{
clusters.Coordinates{1, 2},
clusters.Coordinates{5, 8},
clusters.Coordinates{1.5, 1.8},
}
km := clusters.NewKMeans(2)
clusters, err := km.Partition(data)
if err != nil {
panic(err)
}
fmt.Println(clusters)
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
0.0.0-20200529215643-2700303c1762latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.