> For the complete documentation index, see [llms.txt](https://help.connected.illumina.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.connected.illumina.com/icm/analyses/analysis-functionality/task-menu/exploratory-analysis/compare-clusters.md).

# Compare clusters

## What is Compare clusters?

Compare clusters is a tool to identify the optimal number of clusters for K-means Clustering using the Davies-Bouldin index. The Davies-Bouldin index is a measure of cluster quality where a lower value indicates better clustering, i.e., the separation between points within the clusters is low (tight clusters) and separation between clusters is high (distinct clusters).

## Running Compare clusters

We recommend normalizing your data prior to running *Compare clusters*, but the task will run on any counts data node.

* Click the counts data node
* Click the **Exploratory analysis** section of the toolbox
* Click **Compare clusters**
* Configure the parameters
* Click **Finish** to run

<div align="left"><figure><img src="/files/BZwzy2a1PjyZ3QLxVq6v" alt=""><figcaption></figcaption></figure></div>

The parameters for *Compare clusters* are the same as for [*K-means* *clustering*](/icm/analyses/analysis-functionality/task-menu/exploratory-analysis/k-means-clustering.md).

## Compare clusters task report

The *Compare clusters* task report is line chart with the number of clusters on the x-axis and the Davies-Bouldin index on the y-axis.

<figure><img src="/files/UvnY11PvPidVGtTBXOE6" alt=""><figcaption></figcaption></figure>

The *Compare clusters* task report can be used to run *K-means clustering.*

* Click a point on the plot to select it or type the number of clusters in the text box *Partition data into clusters*

Selecting a point sets it as the number of clusters to partition the data into. The number of clusters with the lowest Davies-Bouldin index value is chosen by default.

* Click **Generate clusters** to run *K-means clustering* with the selected number of clusters

A *K-means clustering* task node and a *Clustering result* data node are produced. Please see our documentation on [K-means Clustering](/icm/analyses/analysis-functionality/task-menu/exploratory-analysis/k-means-clustering.md) for more details.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.connected.illumina.com/icm/analyses/analysis-functionality/task-menu/exploratory-analysis/compare-clusters.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
