Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fit_curve return schema #425

Closed
soxofaan opened this issue Mar 16, 2023 · 4 comments · Fixed by #420
Closed

fit_curve return schema #425

soxofaan opened this issue Mar 16, 2023 · 4 comments · Fixed by #420
Milestone

Comments

@soxofaan
Copy link
Member

soxofaan commented Mar 16, 2023

(related to other "ml" tickets like e.g. #396 (comment))

fit_curve currently returns a datacube:

"returns": {
"description": "A data cube with the optimal values for the parameters.",
"schema": {
"type": "object",
"subtype": "datacube"
}

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

"name": "parameters",
"description": "The parameters for the model function, contains at least one parameter.",
"schema": {
"type": "array",
"minItems": 1,
"items": {
"type": "number"
}

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
Copy link
Member Author

Likewise, the parameters argument of predict_curve should also be just an array

{
"name": "parameters",
"description": "A data cube with optimal values from a result of e.g. ``fit_curve()``.",
"schema": {
"type": "object",
"subtype": "raster-cube"
}
},

@m-mohr m-mohr added this to the 2.0.0 milestone Mar 29, 2023
@m-mohr m-mohr linked a pull request Mar 30, 2023 that will close this issue
@m-mohr
Copy link
Member

m-mohr commented Mar 30, 2023

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

@clausmichele
Copy link
Member

@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
Copy link
Member

m-mohr commented Mar 30, 2023

reduce_dimension doesn't work, but apply_dimension may work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants