clustering OPTICS

new OPTICS(matrix, epsilon, min_points, metricopt) → {OPTICS}

Ordering Points To Identify the Clustering Structure.

Parameters:
NameTypeAttributesDefaultDescription
matrixMatrix

the data.

epsilonNumber

the minimum distance which defines whether a point is a neighbor or not.

min_pointsNumber

the minimum number of points which a point needs to create a cluster. (Should be higher than 1, else each point creates a cluster.)

metricfunction<optional>
euclidean

the distance metric which defines the distance between two points of the matrix.

To Do
  • needs restructuring.
Returns:
Type: 
OPTICS

Methods

get_cluster_affirmation() → {Array}

Returns:

Returns an array, where the ith entry defines the cluster affirmation of the ith point of matrix. (-1 stands for outlier)

Type: 
Array

get_clusters() → {Array.<Array>}

Returns an array of clusters.

Returns:

Array of clusters with the indices of the rows in given matrix.

Type: 
Array.<Array>

init()

Computes the clustering.