kmeans

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRandSeed = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type Clusterer

type Clusterer interface {
	InitCentroids() error
	Cluster() ([][]float64, error)
	SSE() float64
}

type DistanceFunction

type DistanceFunction func(v1, v2 *mat.VecDense) float64

DistanceFunction is a function that computes the distance between two vectors NOTE: clusterer already ensures that the all the input vectors are of the same length, so we don't need to check for that here again and return error if the lengths are different.

type DistanceType

type DistanceType uint16
const (
	L2Distance DistanceType = iota
)

type InitType

type InitType uint16
const (
	Random InitType = iota
	KmeansPlusPlus
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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