kmeans

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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