-
-
Notifications
You must be signed in to change notification settings - Fork 342
Feat : k_Medoids Algorithm #251
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
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 introduces a complete implementation of the K-Medoids (PAM) clustering algorithm in R using R6 object-oriented design. K-Medoids is a robust alternative to K-Means that uses actual data points as cluster centers, making it more resistant to outliers.
Key changes:
- Full K-Medoids implementation with support for Euclidean and Manhattan distance metrics
- Comprehensive API including fit(), predict(), silhouette_score(), and helper methods
- Extensive documentation with roxygen2 comments and four detailed usage examples
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
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
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
Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.
K-Medoids (PAM) Algorithm – Summary Review
Overview
K-Medoids (Partitioning Around Medoids) clusters data into k groups using actual data points (medoids) as centers — more robust and interpretable than K-Means, especially against outliers.
Algorithm Summary
Key Traits:
Strengths ✅
fit(),predict(),silhouette_score(),get_medoids()Improvements 🔧
plot_clusters())Complexity
K-Medoids vs K-Means
Use Cases
✅ Customer segmentation
✅ Document clustering
✅ Noisy or mixed data
❌ Avoid for huge or high-dimensional datasets
Testing
Verdict ⭐⭐⭐⭐⭐
Excellent, production-ready implementation — clean, robust, well-documented, and ideal for educational or research use.
Next steps: add optimization, visualization, and CLARA variant for scalability.