clustering

package
v0.0.0-...-3fbf507 Latest Latest
Warning

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

Go to latest
Published: May 21, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

This package implements clustering algorithms

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BitCount

func BitCount(n *big.Int) int

How many bits?

Types

type ClusterMap

type ClusterMap map[int][]int

ClusterMap contains the cluster identifier as a key, followed by a vector of point indices that cluster contains.

func DBSCAN

func DBSCAN(inst base.FixedDataGrid, params DBSCANParameters) (ClusterMap, error)

DBSCAN clusters inst using the parameters allowed in and produces a ClusterId->[RowId] map

func (ClusterMap) Equals

func (ref ClusterMap) Equals(other ClusterMap) (bool, error)

Equals checks whether a bijection exists between two ClusterMaps (i.e. the clusters in one can be re-labelled to become the clusters of another)

func (ClusterMap) Invert

func (ref ClusterMap) Invert() (map[int]int, error)

Invert returns an alternative form of cluster map where the key represents the point index and the value represents the cluster index it's assigned to

type ClusterParameters

type ClusterParameters struct {
	// Attributes represents the set of Attributes which
	// can be used for clustering
	Attributes []base.Attribute

	// Metric is used to compute pairwise distance
	Metric pairwise.PairwiseDistanceFunc
}

type DBSCANParameters

type DBSCANParameters struct {
	ClusterParameters

	// Eps represents the "reachability", or the maximum
	// distance any point can be before being considered for
	// inclusion.
	Eps float64

	// MinCount represents how many points need to be
	// in a cluster before it is considered one.
	MinCount int
}

DBSCANParameters describes the parameters of the density-based clustering algorithm DBSCAN

Jump to

Keyboard shortcuts

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