cluster

package
v0.0.0-...-38d63f0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2015 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package cluster provides interfaces and types for data clustering in ℝⁿ.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Center

type Center interface {
	Point

	// Members returns a set of indices into the slice returned by Clusterer.Values() that
	// refers to the Values associated with the Center.
	Members() Indices
}

A Center is a representation of a cluster center.

type Clusterer

type Clusterer interface {
	// Cluster the data.
	Cluster() error

	// Centers returns a slice of centers of the clusters.
	Centers() []Center

	// Values returns the internal representation of the original data.
	Values() []Value
}

Clusterer is the common interface implemented by clustering types.

type Indices

type Indices []int

Indices is a list of indexes into a array or slice of Values.

type Interface

type Interface interface {
	Len() int               // Return the length of the data vector.
	Values(i int) []float64 // Return the data values for element i as a slice of float64.
}

Interface is a type that can be clustered by a Clusterer.

type Point

type Point interface {
	V() []float64
}

Point represents a point in ℝⁿ.

type Value

type Value interface {
	Point

	// Cluster returns an index into the slice returned by Clusterer.Centers() that
	// refers to the Center associated with the Value.
	Cluster() int
}

A Value is the representation of a data point within the clustering object.

type Weighter

type Weighter interface {
	Weight(i int) float64 // Return the weight for element i.
}

Weighter is an extension of the Interface that allows values represented by the Interface to be differentially weighted.

Jump to

Keyboard shortcuts

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