kmeans

package
v0.0.0-...-152b127 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KMeans

type KMeans struct {
	Centroids [][]float32
	Output    io.Writer
	// contains filtered or unexported fields
}

KMeans structure for book keeping the KMeans computation

func NewKMeans

func NewKMeans(k, maxIterations int, trainingSet [][]float32) *KMeans

NewKMeans create a KMeans object to store the result of KMeans clustering

func (*KMeans) Cluster

func (km *KMeans) Cluster() error

Cluster Performs KMeans clustering

func (*KMeans) Labels

func (km *KMeans) Labels() []int

Labels : Return the cluster labels

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL