Open-EO / openeo-processes

Interoperable processes for openEO's big Earth observation cloud processing.
https://processes.openeo.org
Apache License 2.0
49 stars 14 forks source link

medoid process #447

Open jdries opened 11 months ago

jdries commented 11 months ago

PS: this is a draft, needs some work, but have to get started somewhere, improvements welcome

medoid

Context

In compositing methods, from a set of spectral band values, users want to select the one that is the least dissimilar to all other values. This is exactly what medoid does. The concept can also be seen as a rank composite, where the rank band is the sum of distances to all other elements in the set.

Summary

From a set of spectral band values, selects the element that is the least dissimilar to all other elements in the set.

Description

Medoids are representative objects of a data set whose sum of dissimilarities to all the objects in the data set is minimal.

Parameters

data

Optional: no

Description

N-dimensional input data cube over which the medoid is to be computed

row_dimensions

Optional: no

Description

The dimension(s) that define a single object. For instance, the 'bands' dimension often defines objects when compositing.

Data Type

data cube

Categories

Links to additional resources (optional)

m-mohr commented 11 months ago

All the math processes we have are usually working on numbers (that are then used in apply, reduce, ...), not on data cubes. Could we somehow make this work similarly?

clausmichele commented 11 months ago

Indeed, can't this be applied in a reduce_dimension maybe?

jdries commented 10 months ago

The problem is that medoid is basically an operation on a multi-dimensional matrix, while our current datatypes are either 1-dimensional arrays, or data cubes. I tried to come up with something based on existing processes already, but one of the intermediate steps involves computing a distance matrix, which is again something I couldn't represent in openEO.