Skip to content

Incremental versions of Existing Clustering Indices (metrics) #24187

Open

Description

@NiklasMelton

Describe the workflow you want to enable

There currently exists 3 CVIs (cluster validity indices) in the main branch. These metrics are very useful for indicating performance of unsupervised clustering methods and add value to the module. However, these methods suffer from high computational complexity which can make them intractable for large datasets and online implementations. Silhouette, Davies-Bouldin, and Calinski-Harabasz have O(n^2), O(nlogn), and O(nlogn) complexity, respectively.

Within the past few years, incremental versions of these algorithms have been introduced. These iCVIs replicate identical results of the batch (original) versions but in an online and more efficient way. The incremental versions of those existing CVIs have time complexities of O(n) for each. This has obvious benefit for large datasets and online implementation.

While the incremental versions of these indices are themselves new and not highly cited, they are simply improvements to methods which already exist in this repository and would extend viability to a larger range of applications.

Describe your proposed solution

Implement incremental versions of the Silhouette, Davies-Bouldin, and Calinski-Harabasz methods within the metrics submodule. Each method would necessarily be a class with an incremental update method.

Given the go-ahead, I will submit a pull request with these methods.

Describe alternatives you've considered, if relevant

Simply continue using the batch versions and deal with the time complexity

Additional context

https://arxiv.org/pdf/1801.02937.pdf
https://ieeexplore.ieee.org/document/8970493

Activity

  1. AP6YC commented on Sep 9, 2022

    @AP6YC

    Here is the current development repository/package for the batch and incremental CVI implementations: https://pypi.org/project/cvi/

  2. removed
    Needs Triage
    on Oct 17, 2022
  3. added
    Needs Decision - Include Feature
    Needs Triage
    on Mar 28, 2026
  4. ogrisel commented on Jun 19, 2026

    @ogrisel
    Member

    @NiklasMelton and @AP6YC Sorry for the lack of reply. I don't know why this feature request was never explicitly triaged.

    I haven't checked the details but since the proposed metrics are computational improvements over what we already have in scikit-learn, I think this is ok for inclusion on my end. Feel free to open a PR.

  5. removed
    Needs Decision - Include Feature
    Needs Triage
    on Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions