HabitatSampler issueshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues2022-07-04T17:40:49+02:00https://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/57The selection of the class should be independent of its order in the referenc...2022-07-04T17:40:49+02:00Romulo Pereira GoncalvesThe selection of the class should be independent of its order in the reference data.The following code at [inner_procedure.r#L249](https://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/blob/master/R-package/R/inner_procedure.r#L249)
```
index <- which.max(dif[2,])
```
Will pick the first class which has the maxim...The following code at [inner_procedure.r#L249](https://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/blob/master/R-package/R/inner_procedure.r#L249)
```
index <- which.max(dif[2,])
```
Will pick the first class which has the maximum value. That means the order in which the classes are define in the reference data will dictate which class is selected. We have printed the values for each run and we have seen the following:
```
[1] "The difference between classes:"
[1] "Deciduous_trees was 0.375"
[1] "Bare_ground was 0.3"
[1] "Xeric_grass was 0.3"
[1] "Fesh_meadow was 0.357142857142857"
[1] "Heather_mature was 0.375"
[1] "Heather_pioneer was 0.409090909090909"
[1] "Heather_scrubby was 0.409090909090909"
```
As we can see `Heather_pioneer` will be selected, but if in the reference data the order was different `Heather_scrubby` would be the one selected. We think in case there is more than one class with the max value, then the user should re-sample. Would that be correct?
Related to this we still have few questions:
1. We would like to understand what these value mean? Is it a percentage?
2. In some cases the decision is done at the 5 decimal digit. It also happens that this values are all below `0.4` and we have never seen them above `0.5`. We wonder if the information above should not be shared with the user to assist the user in deciding either to accept the class selection or do a re-sample? This question depends on the meaning of the values, which is question 1.Future optimizationsCarsten NeumannCarsten Neumannhttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/41Display error in browser plot after multitest2022-04-19T14:56:16+02:00Antonia SchönbergDisplay error in browser plot after multitestWhen using multi_class_sampling with multitest=3, the following display errors occur in the browser plot:
- Negative values and values above the range of the probability in the legend.
- The range of the probability in the legend does ...When using multi_class_sampling with multitest=3, the following display errors occur in the browser plot:
- Negative values and values above the range of the probability in the legend.
- The range of the probability in the legend does not match the preview in R (see class "high").
However, this is only a display error, since the selected thresholds (determined by the mouse pointer) give the expected extent of the habitats.
Screenshots are attached.
![hasa_tresh](/uploads/0ea6d14ac4ce6df813bee09203a92822/hasa_tresh.PNG)
![hasa_treshB](/uploads/cf5c6ff2c95d38ca83f7e893ee36ae39/hasa_treshB.PNG)
![hasa_treshC](/uploads/fe286fe20b3ee04ca8eb780134fa598d/hasa_treshC.PNG)Future optimizationshttps://git.gfz-potsdam.de/habitat-sampler/HabitatSampler/-/issues/36check data type of input image for processing time optimization2023-12-19T13:02:50+01:00Carsten Neumanncheck data type of input image for processing time optimizationI recognized that we use a FLT4S (float 4 byte signed) datatype for our benchmark image. This is absolutely not necessary and decreases processing speed drastically!!! A smart solution would be to always automatically **rescale input ima...I recognized that we use a FLT4S (float 4 byte signed) datatype for our benchmark image. This is absolutely not necessary and decreases processing speed drastically!!! A smart solution would be to always automatically **rescale input imagery** between 0...10,000. However, it is not easy in the raster/rgdal *.tif environment since values in memory are not affecting datatype when not writing out on disk. **Any solution on datatype change on the flow would be cool to speed up processing.** Have a look on our benchmark image to see what it means to artificially blow up an integer type to float! I guess it is already considered in the *json approach of the GUI.Future optimizationsCarsten NeumannCarsten Neumann