openEOPlatform / openeo-classification

openEO based classification workflows & utilities, for landcover and crop mapping usecases.
Apache License 2.0
4 stars 1 forks source link

supporting land use classification of subset of target classes #10

Closed Bart92 closed 2 years ago

Bart92 commented 2 years ago

We now throw an error if the user does not allocate all LUCAS subclasses to a target class. Build in support for classification on a subset of the reference data

Patrick1G commented 2 years ago

small addition: It would also be useful if the user can define the new name of the (merged) target class, in the widget and programmatically, currently it does not seem possible (see below)

Also, it would be nice to add support for balanced sampling (e.g. equal number of samples for all classes), or even stratified sampling (e.g. 10% of overall samples), which is a bit more effort I guess...

image

Bart92 commented 2 years ago

Hi Patrick, the first two are fixed, that is:

With respect to the sampling, I think it is very easy to do that as a user, as we are returning a pandas.DataFrame (y) containing the total amount of data found within that specific area. On that, a user can easily apply whichever sampling strategy he wants. Maybe I can just add in the notebook a block where I just use one example of how to sample a pandas dataframe with a strategy ?

Patrick1G commented 2 years ago

Hi Bart, thanks, that sounds good.. 1) even setting an integer value for the new merged output class is valuable, of course... 2) being able to run on just a suset of all possible classes is essential for the LUCAS datasets but also future ones such as EuroCrops or WorldCover... 3) demonstrating some advanced sampling functionality in a notebook or as part of the openeo_classification.py would be valuable. Equal sampling (e.g. each class 300 samples) or stratified sampling (e.g. depending on the total samples per class) would be the most important options here..

Bart92 commented 2 years ago

Hi Patrick, could you have a look at https://github.com/openEOPlatform/SRR3_notebooks/blob/main/notebooks/Demo%20UC9.ipynb to see if this is what you meant?