Skip to content

Add prototype merge and split for CONN - #118

Merged
AP6YC merged 2 commits into
developfrom
conn-prototype-operations
Sep 29, 2026
Merged

AP6YC merged 2 commits into
developfrom
conn-prototype-operations

Conversation

@NiklasMelton

@NiklasMelton NiklasMelton commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add prototype-based merge and split for CONN's FuzzyART, KMeans, and MiniBatchKMeans models.
  • Use ARTlib prototype movement for FuzzyART. For KMeans models, retain fixed centers and recorded connectivity while tracking sample counts per prototype to recalculate the score after reassignment.
  • Add get_prototype_ids(label), reject KMeans splits that leave either cluster without assigned samples, and document the operation semantics.
  • Require ARTlib 0.1.12 for the optional ART and test dependencies.

Test plan

  • python3 -m pytest -q tests/test_conn.py tests/test_operations.py tests/test_backends.py -o addopts='' — 416 passed.

@NiklasMelton NiklasMelton linked an issue Sep 24, 2026 that may be closed by this pull request
@NiklasMelton
NiklasMelton requested a review from AP6YC September 24, 2026 19:24
Comment thread docs/source/api.rst

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.

Super cool!

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.

This overall makes sense; I'll trust this implementation of split and merge for CONN.

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.

Tests are always good

Comment thread pyproject.toml

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.

It makes sense to up the art dep here, but now I realize that I don't know why art would be needed for the optional JAX backend. That'll be something for me to dive into.

@AP6YC
AP6YC merged commit 07e9306 into develop Sep 29, 2026
7 checks passed
@AP6YC
AP6YC deleted the conn-prototype-operations branch September 29, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add merge op for CONN

2 participants