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

ML Generic API #497

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `load_geojson`
- `load_ml_model`
- `load_url`
- `ml_fit_class_random_forest`
- `ml_fit_regr_random_forest`
- `ml_fit`
- `ml_predict`
- `save_ml_model`
- `unflatten_dimension`
Expand Down
4 changes: 2 additions & 2 deletions proposals/load_ml_model.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "load_ml_model",
"summary": "Load a ML model",
"description": "Loads a machine learning model from a STAC Item.\n\nSuch a model could be trained and saved as part of a previous batch job with processes such as ``ml_fit_regr_random_forest()`` and ``save_ml_model()``.",
"description": "Loads a machine learning model from a STAC Item.\n\nSuch a model could be trained and saved as part of a previous batch job with processes such as ``ml_fit()`` and ``save_ml_model()``.",
"categories": [
"machine learning",
"import"
Expand Down Expand Up @@ -43,4 +43,4 @@
"rel": "about"
}
]
}
}
89 changes: 89 additions & 0 deletions proposals/ml_fit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"id": "ml_fit",
"summary": "Train a machine learning or deep learning model",
"description": "Fit a machine learning or deep learning model to training data. It can be used for both classification and regression tasks, determined by the nature of the labels.",
"categories": [
"machine learning",
"deep learning"
],
"experimental": true,
"parameters": [
{
"name": "predictors",
"description": "The predictors for the model as a vector data cube. These are the independent variables that the algorithm analyses to learn patterns and relationships within the data.",
"schema": [
{
"type": "object",
"subtype": "datacube",
"dimensions": [
{
"type": "geometry"
},
{
"type": "bands"
}
]
},
{
"type": "object",
"subtype": "datacube",
"dimensions": [
{
"type": "geometry"
},
{
"type": "other"
}
]
}
]
},
{
"name": "target",
"description": "The dependent variable for the model. These are the labeled data, aligning with predictor values based on a shared geometry dimension. This ensures a clear connection between predictor rows and labels.",
"schema": {
"type": "object",
"subtype": "datacube",
"dimensions": [
{
"type": "geometry"
}
]
}
},
{
"name": "ml_method",
"description": "The machine learning method to be used for fitting the model.",
"schema": {
"type": "string",
"enum": [
"cnn",
"cnn_lstm",
"mlp",
"random_forest",
"resnet",
"svm",
"tempcnn",
"xgboost"
],
"default": "random_forest"
}
},
{
"name": "parameters",
"description": "Additional parameters for the chosen machine learning method, passed as an object.",
"schema": {
"type": "object"
},
"default": null,
"optional": true
}
],
"returns": {
"description": "A model object that can be saved with ``save_ml_model()`` and restored with ``load_ml_model()``.",
"schema": {
"type": "object",
"subtype": "ml-model"
}
}
}
110 changes: 0 additions & 110 deletions proposals/ml_fit_class_random_forest.json

This file was deleted.

110 changes: 0 additions & 110 deletions proposals/ml_fit_regr_random_forest.json

This file was deleted.

4 changes: 2 additions & 2 deletions proposals/ml_predict.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
{
"name": "model",
"description": "A ML model that was trained with one of the ML training processes such as ``ml_fit_regr_random_forest()``.",
"description": "A ML model that was trained with the ML training process ``ml_fit()``.",
"schema": {
"type": "object",
"subtype": "ml-model"
Expand Down Expand Up @@ -46,4 +46,4 @@
]
}
}
}
}
Loading