Skip to content

Commit 01733f7

Browse files
committed
generic ml fit, load_ml and save_ml update
1 parent c618a87 commit 01733f7

File tree

4 files changed

+70
-7
lines changed

4 files changed

+70
-7
lines changed

meta/subtype-schemas.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@
232232
}
233233
}
234234
},
235-
"mlm-model": {
235+
"ml-model": {
236236
"type": "object",
237237
"subtype": "ml-model",
238238
"title": "Machine Learning Model",

proposals/load_ml_model.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "load_ml_model",
33
"summary": "Load a ML model",
4-
"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()``.",
4+
"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()``.",
55
"categories": [
66
"machine learning",
77
"import"
@@ -10,7 +10,7 @@
1010
"parameters": [
1111
{
1212
"name": "uri",
13-
"description": "The STAC Item to load the machine learning model from. The STAC Item must implement the `mlm-model` extension.",
13+
"description": "The STAC Item to load the machine learning model from. The STAC Item must implement the `ml-model` extension.",
1414
"schema": [
1515
{
1616
"title": "URL",
@@ -37,7 +37,7 @@
3737
},
3838
"links": [
3939
{
40-
"href": "https://github.com/crim-ca/mlm-extension",
40+
"href": "https://github.com/stac-extensions/mlm",
4141
"title": "Machine Learning Model STAC extension",
4242
"type": "text/html",
4343
"rel": "about"

proposals/ml_fit.json

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"id": "ml_fit",
3+
"summary": "Train a machine learning model",
4+
"description": "Executes the fit of a specified machine learning model based on training data. .\n\nThe function is generic and supports different machine learning models.",
5+
"categories": [
6+
"machine learning"
7+
],
8+
"experimental": true,
9+
"parameters": [
10+
{
11+
"name": "model",
12+
"description": "The machine learning model to be trained. This should be an instance of a model that supports the `fit` method.",
13+
"schema": {
14+
"type": "object",
15+
"subtype": "ml-model"
16+
}
17+
},
18+
{
19+
"name": "training_set",
20+
"description": "The training set for the model, provided as a vector data cube. This set contains both the independent variables and the dependent variable that the model analyzes to learn patterns and relationships within the data.",
21+
"schema": [
22+
{
23+
"type": "object",
24+
"subtype": "datacube",
25+
"dimensions": [
26+
{
27+
"type": "geometry"
28+
},
29+
{
30+
"type": "bands"
31+
}
32+
]
33+
},
34+
{
35+
"type": "object",
36+
"subtype": "datacube",
37+
"dimensions": [
38+
{
39+
"type": "geometry"
40+
},
41+
{
42+
"type": "other"
43+
}
44+
]
45+
}
46+
]
47+
},
48+
{
49+
"name": "target",
50+
"description": "The column in the training set that represents the dependent variable for model training.",
51+
"schema": {
52+
"type": "string"
53+
}
54+
}
55+
],
56+
"returns": {
57+
"description": "A trained model object that can be saved with `save_ml_model()` and restored with `load_ml_model()`.",
58+
"schema": {
59+
"type": "object",
60+
"subtype": "ml-model"
61+
}
62+
}
63+
}

proposals/save_ml_model.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "save_ml_model",
33
"summary": "Save a ML model",
4-
"description": "Saves a machine learning model as part of a batch job.\n\nThe model will be accompanied by a separate STAC Item that implements the [mlm-model extension](https://github.com/crim-ca/mlm-extension).",
4+
"description": "Saves a machine learning model as part of a batch job.\n\nThe model will be accompanied by a separate STAC Item that implements the [mlm-model extension](https://github.com/stac-extensions/mlm).",
55
"categories": [
66
"machine learning",
77
"import"
@@ -13,7 +13,7 @@
1313
"description": "The data to store as a machine learning model.",
1414
"schema": {
1515
"type": "object",
16-
"subtype": "mlm-model"
16+
"subtype": "ml-model"
1717
}
1818
},
1919
{
@@ -35,7 +35,7 @@
3535
},
3636
"links": [
3737
{
38-
"href": "https://github.com/crim-ca/mlm-extension",
38+
"href": "https://github.com/stac-extensions/mlm",
3939
"title": "Machine Learning Model STAC extension",
4040
"type": "text/html",
4141
"rel": "about"

0 commit comments

Comments
 (0)