clustering

package module
v0.0.0-...-a9d970f Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2018 License: MIT Imports: 0 Imported by: 0

README

clustering

Build Status Go Report Card

Go implementations of the DBSCAN and k-means clustering algorithms, the k-d tree spatial index and some functions to generate and visualize sample data.

Example Output

Below are two examples that show the algorithms in action. In the output, clusters are indicated by colors; points shown in gray were marked as noise.

The first example is 150 points clustered by k-means:

k-means example output

and DBSCAN:

DBSCAN example output

The second example includes a cluster of points distributed in a non-convex shape. K-means doesn't recognize it:

k-means example output

but DBSCAN does:

DBSCAN example output

Documentation

Overview

Package clustering provides implementations of clustering algorithms for 2-D points.

Index

Constants

View Source
const (
	Unclassified = -1 // points that are not (yet) classified
	Noise        = -2 // points that don't belong to any cluster
)

Pre-defined cluster IDs. IDs for actual clusters start at 0.

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
Package dbscan implement the DBSCAN (Density-based spatial clustering of applications with noise) algorithm.
Package dbscan implement the DBSCAN (Density-based spatial clustering of applications with noise) algorithm.
Package draw provides functions to draw 2-D points as SVG.
Package draw provides functions to draw 2-D points as SVG.
Package generate implements functions that generate random distributions of points.
Package generate implements functions that generate random distributions of points.
Package geometry implement some basic geometry functions for 2-D points.
Package geometry implement some basic geometry functions for 2-D points.
Package index provides spatial indices for 2-D points.
Package index provides spatial indices for 2-D points.
Package kmeans implements the k-means clustering algorithm, with the k-means++ algorithm for choosing initial values.
Package kmeans implements the k-means clustering algorithm, with the k-means++ algorithm for choosing initial values.

Jump to

Keyboard shortcuts

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