single-target regression problem when using MultiOutputRegressor mete-estimator

Issue #1116 resolved
Andreas Rabe created an issue

In single-target regression, we need to handle “real” regressors different than MultiOutputRegressor. The first one, wants y-array to be 1D, the second wants y-array to be 2D, e.g.

Currently we always provide y-array as 1D, which gives the following error:

Traceback (most recent call last):
File "D:\source\QGISPlugIns\enmap-box\site-packages\typeguard\__init__.py", line 903, in wrapper
retval = func(*args, **kwargs)
File "D:\source\QGISPlugIns\enmap-box\enmapboxprocessing\algorithm\fitregressoralgorithmbase.py", line 90, in processAlgorithm
regressor.fit(dump.X, dump.y.ravel())
File "C:\Users\Andreas\AppData\Roaming\Python\Python39\site-packages\sklearn\multioutput.py", line 190, in fit
raise ValueError(
ValueError: y must have at least two dimensions for multi-output regression but has only one.