Repository navigation
Conversation
This branch has not been deployed
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.
Code of Conduct
Reviewed the repository's Code of Conduct.
Description
plot_linear_regressionfits an estimator using a two-dimensional feature array, but passes scalar endpoints topredict. The default scikit-learnLinearRegressiontherefore rejects even the existing User Guide example withExpected 2D array, got scalar array instead.Pass each endpoint as a single-feature sample and extract its prediction. Keep the fitted coefficients, correlation, line limits and plotting options unchanged. Add regressions for the documented data, list/array/column inputs, explicit and automatic limits, LinearRegression/Ridge, and custom correlation/legend options.
Related issues or pull requests
Fixes #1252
Pull Request Checklist
./docs/sources/CHANGELOG.md../mlxtend/plotting/tests/test_plot_linear_regression.py.W293infrequent_patterns/tests/test_association_rules.py:62on baseline and fixed code.The broader plotting test directory cannot collect on either baseline or fixed code because its existing
test_pca_corr_graph.pycompares aVersionobject with a string. No test or CI threshold was changed.Validated locally on Windows, Python 3.12.14, NumPy 2.4.0, SciPy 1.16.3, scikit-learn 1.8.0 and Matplotlib 3.10.8 (Agg backend). No other platform, interactive display or upstream CI pass is claimed.