OPTICS Cluster Assigner

The implementation of the OPTICS algorithm in KNIME consists of two nodes: the OPTICS Cluster Compute node and the OPTICS Cluster Assigner node. Here you will find a brief description of the algorithm, followed by a description of the OPTICS Cluster Assigner node.

OPTICS is an algorithm for finding clusters in spatial data. It was first described in Mihael Ankerst, Markus M. Breunig, Hans-Peter Kriegel, Jörg Sander (1999). "OPTICS: Ordering Points To Identify the Clustering Structure". ACM SIGMOD international conference on Management of data. ACM Press. pp. 49–60 and is based on DBSCAN. Like DBSCAN, it is a density-based clustering algorithm, that is, it groups data points that are densely packed together in some contiguous region of the data space into clusters. Unlike DBSCAN, it can detect clusters of varying density.

The basic idea shared by DBSCAN and OPTICS is that a data point p belongs to a cluster if it has sufficiently many sufficiently close neighbors. "Sufficiently close" is modeled with a parameter epsilon (the neighborhood radius of p), "sufficiently many" with a parameter Minimum Points (the minimum number of points that must be within epsilon of p in order for p to belong to the core of a cluster.)

DBSCAN first checks the epsilon-neighborhood of each point in the data set. If there are more than Minimum Points points in the epsilon-neighborhood of a point p, these points form a cluster. DBSCAN then checks the epsilon-neighborhoods of these points to see if they in turn contain more than Minimum Points data points. If they do, these data points also become part of the cluster. DBSCAN continues in this way until no new point can be added to the cluster.

While this algorithm will find all the clusters with the density determined by the the chosen values for epsilon and Minimum Points, it may miss higher-density clusters that are contained in these clusters. These higher-density clusters become visible only at some epsilon-prime <e epsilon. The problem is that there is no way of knowing these epsilon-prime values in advance, so all one can do is run DBSCAN for as many epsilon-prime values as feasible.

OPTICS solves this problem by ordering the points in the data set and by associating with each point two values: its core-distance and its reachability distance (for definitions, see the link above). This information is enough to find all density-based clusters in the data set for any epsilon-prime <e epsilon (for details on the algorithm, see the link above).

Since both core-distance and reachability-distance are ultimately defined in terms of epsilon and Minimum Points, the only inputs needed to run OPTICS are values for these parameters.

The OPTICS Cluster Assigner node takes the linear ordering produced by the OPTICS Cluster Compute node as input and assigns each point in the ordering to a cluster. The assignment depends on the value of epsilon-prime, which can be set in the Dialog Options.

The node supports custom CSS styling. You can simply put CSS rules into a single string and set it as a flow variable 'customCSS' in the node configuration dialog. You will find the list of available classes and their description on our documentation page.


Distance Calculation

The first tab allows you to set the value of epsilon-prime and the number of bins.

You can set the value of epsilon-prime equal to the mean or to the median of the reachability distances, or you can set it manually. If you change the value of epsilon-prime in interactive view and save it, the dialog window will show "Manual input" and the saved value.
Number of bins
The number of bins determines the visual representation of data points. The greater the number of bins is, the more fine-grained is the visual representation of the data points.

View Configuration

Chart title (*)
The title shown above the image. If left blank, no title will be shown.
Chart subtitle (*)
The subtitle shown above the image. If left blank, no subtitle will be shown.
Show warnings in view
Checking this option enables the display of warning messages.
Width of image (in px)
The width in pixels of the generated SVG image.
Height of image (in px)
The height in pixels of the generated SVG image.
Resize view to fill window
Checking this option resizes the view so that it fills the window.
Display full screen button
Displays a button enabling full screen mode.
Create image at outport
Check this option if you want an image to be created at the upper outport.
Enable view edit controls
If checked, all edit controls selected below will be rendered in the view. Unchecking this option disables all edit controls.
Enable title edit controls
Displays a text box to change title or subtitle.
Enable epsilon prime edit controls
Displays a text box to change the epsilon-prime value.
Enable selection
When this option is checked, data points can be selected in the scatter plot by activating the corresponding button and clicking on points. Extend the selection by holding down the Shift-key while clicking on points. The selection appears in an appended column of the data table.
Publish selection events
Checking this option ensures that other views are notified whenever the selection in the current view is changed. See also "Subscribe to selection events".

Input Ports

The model data input.
The input data.

Output Ports

Image port.
The input data with a column detailing each tuple's Cluster ID.
Summary table with counts for each cluster.


Interactive View: Reachability Distance Plot

Clicking on "Interactive View: Reachability Distance Plot" in the context menu brings up a bar chart representing data points, with the height of the bars representing reachability distance. What clusters you see depends on the location of the epsilon-prime line. The higher you drag it, the fewer clusters you see.




You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.