-
-
Notifications
You must be signed in to change notification settings - Fork 25.5k
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
Interactive Imputer cannot accept PLSRegression() as an estimator due to "shape mismatch" #19352
Interactive Imputer cannot accept PLSRegression() as an estimator due to "shape mismatch" #19352
Comments
Thanks @firshu, I can reproduce. The fix is probably to simply call Would you like to submit a PR for this? On top of the fix we'd need a small non-regression test to make sure the shape is correct. |
Hello, Nicolas,
I honestly don't think I am qualified to provide a solid fix. My python skill is quite limited and was just hoping to let the supporting team to know bug.
…On Feb 5 2021, at 1:23 am, Nicolas Hug ***@***.***> wrote:
Thanks @firshu ***@***.***/0?redirect=https%3A%2F%2Fgithub.com%2Ffirshu&recipient=cmVwbHkrQUhFNU9FUjZKQUFRN0hWNDdRSEU0QkY2RkRYWkRFVkJOSEhDN1M3Sk5BQHJlcGx5LmdpdGh1Yi5jb20%3D), I can reproduce.
The fix is probably to simply call ravel() on the output of predict for single-target predictions.
Would you like to submit a PR for this? On top of the fix we'd need a small non-regression test to make sure the shape is correct.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub ***@***.***/1?redirect=https%3A%2F%2Fgithub.com%2Fscikit-learn%2Fscikit-learn%2Fissues%2F19352%23issuecomment-773907462&recipient=cmVwbHkrQUhFNU9FUjZKQUFRN0hWNDdRSEU0QkY2RkRYWkRFVkJOSEhDN1M3Sk5BQHJlcGx5LmdpdGh1Yi5jb20%3D), or unsubscribe ***@***.***/2?redirect=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAHE5OEU3O3QHCFI5FA7V543S5O2JDANCNFSM4XEGNEMQ&recipient=cmVwbHkrQUhFNU9FUjZKQUFRN0hWNDdRSEU0QkY2RkRYWkRFVkJOSEhDN1M3Sk5BQHJlcGx5LmdpdGh1Yi5jb20%3D).
|
Can I work on this issue, please? |
@NicolasHug I took this issue due to stalled PRs. Can you please check PR #20355 ? Please. |
@zak34drexel This issue is not good first issue because the solution is not simple, as discussed in #20355. For a good first issue, I recommend: #21350 |
Describe the bug
When setting the estimator as PLSRegression(), a ValueError is triggered by module '_iteractive.py' in line 348, caused by "shape mismatch"
Steps/Code to Reproduce
Example:
Expected Results: after applying the workaround below:
Actual Results
Versions
System:
python: 3.6.9 (default, Oct 8 2020, 12:12:24) [GCC 8.4.0]
executable: /home/hushsh/raid_data/py3/bin/python
machine: Linux-5.4.0-60-generic-x86_64-with-LinuxMint-19.3-tricia
Python dependencies:
pip: 21.0.1
setuptools: 47.3.1
sklearn: 0.24.1
numpy: 1.18.1
scipy: 1.4.1
Cython: 0.29.15
pandas: 1.1.3
matplotlib: 3.1.2
joblib: 0.14.1
threadpoolctl: 2.1.0
Built with OpenMP: True
My Workaround that fixed the bug: Insert the following three lines before line 348
The text was updated successfully, but these errors were encountered: