Let the user select the output number of components in Transform Raster
In most cases, the user does not require as many components as original bands and writing all components
is a waste of time and space. Obvious example is PCA.
Comments (13)
-
-
reporter Right, but this is a really important and very commonly used parameter that should have its own button, otherwise the (probably hasty) user will not be aware of it. Anyway, as there is a way to accomplish it, this is not a priority issue.
Also, in particular for PRISMA images, an option to select input bands would be convenient (as there are quite a number of them that might be better to ignore). Or use a bbl field as in envi. In other cases, the user might want to apply the transform to just the VISNIR part, or the SWIR etc. Being able to select input bands avoids the need of making multiple similar copies of the data.
-
an option to select input bands would be convenient
This is a general issue. Almost every algorithm with a raster input could have a band subset selection widget. Currently, we decided to not do that, in favour of more concise dialogs. We thought that having such blocks everywhere is not so nice (… but maybe we should rethink that?):
Being able to select input bands avoids the need of making multiple similar copies of the data.
You wouldn’t need to make a hard copy. Instead you should create a lightweight VRT raster:
-
To allow for a more convinient band subsetting, we could have a shortcut “Subset bands” in the context menu here, right next to “Save as” option:
In the “Subset bands” algorithm dialog, you can only select the band subset for the given raster:
And the result will always be a VRT raster:
-
In other cases, the user might want to apply the transform to just the VISNIR part, or the SWIR etc.
that is planned, see
#879
-
Or use a bbl field as in envi.
We currently only use the BBL information in the Translate raster layer algorithm. Here you can chose to exclude BBL bands.
Any other ideas, where to use BBL?
-
reporter The previous “Subset bands + vrt” step that you suggest is a very general god way to select input bands.
I still think that, for PCA and other transforms, the output nb. of components should have its own button. This is almost an inherent parameter
for defining the result. In most cases the user will no be keeping all components.
Any other ideas, where to use BBL?
Besides all transforms, by now this is what I can think of:
- In the spectral plots (eg. option “apply BBL filter” or “exclude bad bands”)
- In the future “Subset bands”, optionally bad bands could get automatically ticked ((so the user saves ticking many squares),
-
I still think that, for PCA and other transforms, the output nb. of components should have its own button. This is almost an inherent parameter
Alright, I will overhaul the transform algorithms soon and take this into concideration.
In the spectral plots (eg. option “apply BBL filter” or “exclude bad bands”)
Yes:
#903
-
The previous “Subset bands + vrt” step that you suggest is a very general god way to select input bands.
Is now implemented: https://bitbucket.org/hu-geomatics/enmap-box/issues/890/add-a-subset-raster-layer-bands-algorithm
-
I still think that, for PCA and other transforms, the output nb. of components should have its own button. This is almost an inherent parameter
We discussed this today in the team and decided to not implement a widget for selecting the number of component.
We will edit the default code snippets and add the according keyword. E.g. for PCA we will have:
pca = PCA(n_components=None)
-
- changed milestone to 3.10 (Feature)
-
-
assigned issue to
-
assigned issue to
-
- changed status to wontfix
Number of components need to be specified inside the code snippet.
- Log in to comment
Hi Agus, the number of components is always defined by the fit transformer algorithm. In PCA use the n_components keyword:
The link to the scikit-learn doc is always given in the algo description, e.g.
https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.PCA.html