Add docstrings to MCA class and fix outdated fit docstring#201
Merged
MaxHalford merged 1 commit intoMaxHalford:masterfrom Feb 27, 2026
Merged
Add docstrings to MCA class and fix outdated fit docstring#201MaxHalford merged 1 commit intoMaxHalford:masterfrom
MaxHalford merged 1 commit intoMaxHalford:masterfrom
Conversation
- Add class-level docstring to MCA with numpydoc-style parameter descriptions for all 10 constructor arguments - Fix MCA.fit docstring: remove reference to non-existent K parameter, document the actual behavior (one-hot encoding + CA on indicator matrix) - Add one-line docstrings to _prepare, row_coordinates, column_coordinates, row_cosine_similarities, column_cosine_similarities
Owner
|
Thank you so much! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MCAwith numpydoc-style parameter descriptions for all 10 constructor argumentsMCA.fitdocstring: it referenced a non-existentKparameter — replaced with an accurate description of the actual behavior (one-hot encoding + CA on the indicator matrix,K_stored for corrections)_prepare,row_coordinates,column_coordinates,row_cosine_similarities, andcolumn_cosine_similaritiesMotivation
While using
prince.MCAin a project, I noticed thefitdocstring mentions passing inKas a parameter, which doesn't match the current API (the number of variables is inferred fromX.shape[1]). Took the opportunity to document the other methods as well.No functional changes — docstrings only.