Problem with EnMAP-Box QGIS Plugin for Classfication
Issue #502
closed
I tried to run the EnMAP-Box QGIS Plugin to classify a raster image using Support Vector Classifier. The tool ran for a few minutes but then it failed to give me the results. Instead, it showed these lines of errors:
Traceback (most recent call last):
File "C:/Users/name/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\provider.py", line 150, in processAlgorithm
result = self.processAlgorithm_()
File "C:/Users/name/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapboxgeoalgorithms\algorithms.py", line 282, in processAlgorithm_
estimator.fit(sample=self.sample())
File "C:/Users/name/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubflow\core.py", line 5194, in _fit
self.sklEstimator().fit(X=X, y=y)
File "C:\Users\name\AppData\Roaming\Python\Python37\site-packages\sklearn\pipeline.py", line 330, in fit
Xt = self._fit(X, y, **fit_params_steps)
File "C:\Users\name\AppData\Roaming\Python\Python37\site-packages\sklearn\pipeline.py", line 296, in _fit
**fit_params_steps[name])
File "C:\Users\name\AppData\Roaming\Python\Python37\site-packages\joblib\memory.py", line 352, in __call__
return self.func(*args, **kwargs)
File "C:\Users\name\AppData\Roaming\Python\Python37\site-packages\sklearn\pipeline.py", line 740, in _fit_transform_one
res = transformer.fit_transform(X, y, **fit_params)
File "C:\Users\name\AppData\Roaming\Python\Python37\site-packages\sklearn\base.py", line 693, in fit_transform
return self.fit(X, y, **fit_params).transform(X)
File "C:\Users\name\AppData\Roaming\Python\Python37\site-packages\sklearn\preprocessing\_data.py", line 667, in fit
return self.partial_fit(X, y)
File "C:\Users\name\AppData\Roaming\Python\Python37\site-packages\sklearn\preprocessing\_data.py", line 698, in partial_fit
force_all_finite='allow-nan')
File "C:\Users\name\AppData\Roaming\Python\Python37\site-packages\sklearn\base.py", line 420, in _validate_data
X = check_array(X, **check_params)
File "C:\Users\name\AppData\Roaming\Python\Python37\site-packages\sklearn\utils\validation.py", line 73, in inner_f
return f(**kwargs)
File "C:\Users\name\AppData\Roaming\Python\Python37\site-packages\sklearn\utils\validation.py", line 654, in check_array
context))
ValueError: Found array with 0 sample(s) (shape=(0, 11)) while a minimum of 1 is required by StandardScaler.
Can someone tell me what these errors mean and how could this be avoided? Thanks.
Comments (6)
-
-
reporter Hello Andreas, Thank you for the quick response. I checked my data for possible cause of the errors. I noticed that some of the training polygons fell on 'nodata' areas of the raster. Will this be a source of error? I'll run it again and if I get into problems, I'll email you back.
Best, Rick
-
Hi Rick, not sure if I missed your email? Any news on the issue? Can we close it?
-
-
assigned issue to
-
assigned issue to
-
- changed status to on hold
-
- changed status to closed
- Log in to comment
Maybe this is a bug, or something is wrong with your data. Can you share the data (e.g. send a link for downloading it to my email andreas.rabe@geo.hu-berlin.de)