cluster

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KMeansClassifier

type KMeansClassifier struct {
	// contains filtered or unexported fields
}

KMeansClassifier finds the k cluster centroids which minimize the associative

distances with the training input.

func NewKMeansClassifier

func NewKMeansClassifier(k int, maxIterations int) *KMeansClassifier

NewKMeansClassifier constructs a KMeansClassifier

func (*KMeansClassifier) ClusterCentroids

func (kmc *KMeansClassifier) ClusterCentroids() []ml.Datum

ClusterCentroids returns the centroids

func (*KMeansClassifier) Fit

func (kmc *KMeansClassifier) Fit(input []ml.Datum) ([]int, int, error)

Fit finds the KMeans centroids given the input and saves the result.

the number of values that associate with each centroid and the number of iterations
is returned

Jump to

Keyboard shortcuts

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