Skip to content

Add kmeans support to batch Conn index - #91

Merged
AP6YC merged 2 commits into
developfrom
kmeans-conn
Sep 10, 2026
Merged

AP6YC merged 2 commits into
developfrom
kmeans-conn

Conversation

@NiklasMelton

@NiklasMelton NiklasMelton commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

Kmeans was the original approach used in the CONN papers and is highly effective and fast for batch calculations. Fuzzy ART was only introduced for the incremental version. This PR adds kmeans and mini-batch kmeans as optional backends for the batch modes of CONN index.

Additionally, CONN is added to the init.py files of the repo and CVI_info is added to the conn class.

@NiklasMelton
NiklasMelton requested a review from AP6YC September 8, 2026 21:42
Comment thread src/cvi/modules/CONN.py

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with these changes, but I'll suggest some optimization for another issue/PR. For example, the conn state builds a FuzzyART module and takes all of its options during construction, even if you use means in batch mode. It's a minor note, but worth an optimization feature later on.

Comment thread tests/test_conn.py

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with this test harness for conn.

Comment thread tests/test_cvi.py

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this deserves a more elegant api on my side to figure out how to share the same construction and testing interface for conn along with the other cvis. Maybe break out an options object to pass to each cvi that depends on the cvi? I will meditate on this.

@AP6YC AP6YC self-assigned this Sep 10, 2026
@AP6YC AP6YC added the enhancement New feature or request label Sep 10, 2026
@AP6YC
AP6YC merged commit 0071061 into develop Sep 10, 2026
7 checks passed
@AP6YC
AP6YC deleted the kmeans-conn branch September 10, 2026 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants