-
Notifications
You must be signed in to change notification settings - Fork 24
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
[Bug]: spectrochempy.PLSRegression.predict() - not enough values to unpack (expected 2, got 1) #762
Comments
Hello, Thank you very much for your message. It looks like it is related to the Can you check ?, e.g.:
if a single name Of course let us know whether this solves your problem. Thanks, |
I modified my code and programmed PLS Regression by hand from sklearn.cross_decomposition. This works fine. Checking the dims got me
So, no abnormality in dimensions. |
Thank you for your reply. Can you post or email me (arnaud.travert at unicaen.fr) the X and Y datasets with which ou are working -- or minimum sample datasets ? With this in hand I should be able to debug spectrochempy. If you can't, yes the direct use of sklearn is indeed the solution ! Best, |
What happened?
I trained PLSRegression with IR spectra. The loadings look as expected. Unfortunately, runnding predict() results in the error
"ValueError: not enough values to unpack (expected 2, got 1)"
`File ~\Programme (portabel)\WPy64-31090\python-3.10.9.amd64\lib\site-packages\spectrochempy\utils\decorators.py:376, in _set_output.call(self, obj, *args, **kwargs)
374 X_transf.title = self.title
375 # make coordset
--> 376 M, N = X.shape
378 if X_transf.shape == X.shape and self.typex is None and self.typey is None:
379 X_transf.dims = X.dims
ValueError: not enough values to unpack (expected 2, got 1)`
What did you expect to happen?
Getting the predictes result.
Minimal Complete Verifiable Example
No response
Relevant log output
No response
Anything else we need to know?
No response
Environment
INSTALLED VERSIONS
commit: None
python: 3.10.9 (tags/v3.10.9:1dd9be6, Dec 6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 140 Stepping 1, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: ('en_US', 'ISO8859-1')
-- dev installation --
FileNotFoundError: [Errno 2] No such file or directory: 'C:\XXXXXXXXXXXXXXX\lib\site-packages\requirements\requirements_dev.txt'
The text was updated successfully, but these errors were encountered: