-
Notifications
You must be signed in to change notification settings - Fork 1
Add constraints #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add constraints #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a constraints feature to the vsclust fuzzy c-means clustering algorithm, allowing users to fix certain membership values to zero. This enables excluding specific features from being assigned to particular clusters.
Key Changes:
- Added optional
constraintsparameter (logical matrix) to clustering functions that forces membership values to zero for constrained feature-cluster pairs - Updated C++ implementation with constraint-aware versions of distance and membership update functions
- Added comprehensive test coverage for constraint functionality
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vsclust_algo.cpp | Implements constraint logic in C++ fuzzy c-means algorithm with overloaded distance/membership functions |
| src/RcppExports.cpp | Updates exported C++ function signatures to include constraints parameter |
| R/RcppExports.R | Adds R wrapper handling for constraints with default empty matrix initialization |
| R/RunClustering.R | Adds constraints validation and integrates constraint parameter into clustering functions |
| R/WrapperFuncs.R | Propagates constraints parameter through wrapper functions and removes unnecessary clusterExport calls |
| tests/testthat/test-HelperFuncs.R | Adds test cases validating constraint behavior in both vsclust_algorithm and ClustComp |
| man/*.Rd | Updates documentation to describe constraints parameter and fixes existing typos |
| ..Rcheck/00check.log | Build log showing R version update (informational only) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
No description provided.