Open-EO / openeo-processes

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

fit_curve return schema #425

Closed soxofaan closed 1 year ago

soxofaan commented 1 year ago

(related to other "ml" tickets like e.g. https://github.com/Open-EO/openeo-processes/pull/396#issuecomment-1331836520)

fit_curve currently returns a datacube: https://github.com/Open-EO/openeo-processes/blob/f8f6731e5bec1fc147bac7d8075e81d70fe0b0e8/proposals/fit_curve.json#L79-L84

But I think it should return the array of "trained" parameters. It should basically correspond (in number of items) to the parameters parameter of the function callback https://github.com/Open-EO/openeo-processes/blob/f8f6731e5bec1fc147bac7d8075e81d70fe0b0e8/proposals/fit_curve.json#L52-L59

~Unless fit_curve is intended to do the "training" and "prediction" within the same process: you provide a input data cube and a model (least squares cure fitting), the model is trained and immediately applied to the same input data to "smooth" it in some way?~

soxofaan commented 1 year ago

Likewise, the parameters argument of predict_curve should also be just an array https://github.com/Open-EO/openeo-processes/blob/0dd3ab0d81f67506547136532af39b5c9a16771e/proposals/predict_curve.json#L19-L26

m-mohr commented 1 year ago

@clausmichele Do you agree? I think we made it a data cube to allow large scale fitting on data cubes?

clausmichele commented 1 year ago

@m-mohr yes indeed. If we would modify the process as @soxofaan seggests, I guess that then it should be called inside a reduce_dimension or an apply_dimension process. I am using as a reference the old notebook for the use case I prepared here https://github.com/openEOPlatform/SRR2_notebooks/blob/main/UC6%20-%20Forest%20Dynamics.ipynb

Maybe let's check also if @ValentinaHutter has an opinion on this, since she was the last one working on the implementation of it.

m-mohr commented 1 year ago

reduce_dimension doesn't work, but apply_dimension may work.