Skip to content

Commit

Permalink
Variant 2?
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mohr committed May 16, 2023
1 parent 8e85e86 commit 5e27496
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 42 deletions.
7 changes: 0 additions & 7 deletions proposals/load_ml_model.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@
"subtype": "uri",
"pattern": "^https?://"
},
{
"title": "Batch Job ID",
"description": "Loading a model by batch job ID is possible only if a single model has been saved by the job. Otherwise, you have to load a specific model from a batch job by URL.",
"type": "string",
"subtype": "job-id",
"pattern": "^[\\w\\-\\.~]+$"
},
{
"title": "User-uploaded File",
"type": "string",
Expand Down
36 changes: 20 additions & 16 deletions proposals/predict_ml_model.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
{
"id": "predict_ml_model",
"summary": "Predict values values using a ML model",
"description": "Applies a machine learning model to an array and predicts a value/class for it.",
"description": "Applies a machine learning model to a datacube and predicts values/classes for it.",
"categories": [
"machine learning",
"reducer"
"machine learning"
],
"experimental": true,
"parameters": [
{
"name": "data",
"description": "An array of numbers.",
"description": "The input data cube.",
"schema": {
"type": "array",
"items": {
"type": [
"number",
"null"
]
}
"type": "object",
"subtype": "datacube"
}
},
{
Expand All @@ -28,15 +22,25 @@
"type": "object",
"subtype": "ml-model"
}
},
{
"name": "dimension",
"description": "The name of the dimension that the model applies to. Fails with a `DimensionNotAvailable` exception if the specified dimension does not exist.",
"schema": {
"type": "string"
}
}
],
"returns": {
"description": "The predicted value. Returns `null` if any of the given values in the array is a no-data value.",
"description": "The data cube with the predicted values. It removes the specified dimension.",
"schema": {
"type": [
"number",
"null"
]
"type": "object",
"subtype": "datacube"
}
},
"exceptions": {
"DimensionNotAvailable": {
"message": "A dimension with the specified name does not exist."
}
}
}
39 changes: 20 additions & 19 deletions proposals/predict_ml_model_probabilities.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
{
"id": "predict_ml_model_probabilities",
"summary": "Predict class probabilities using a ML model",
"description": "Applies a machine learning model to an array and predicts (class) probabilities for them.",
"description": "Applies a machine learning model to a data cube and predicts (class) probabilities.",
"categories": [
"machine learning",
"reducer"
"machine learning"
],
"experimental": true,
"parameters": [
{
"name": "data",
"description": "An array of numbers.",
"description": "The input data cube.",
"schema": {
"type": "array",
"items": {
"type": [
"number",
"null"
]
}
"type": "object",
"subtype": "datacube"
}
},
{
Expand All @@ -28,18 +22,25 @@
"type": "object",
"subtype": "ml-model"
}
},
{
"name": "dimension",
"description": "The name of the dimension that the model applies to. Fails with a `DimensionNotAvailable` exception if the specified dimension does not exist.",
"schema": {
"type": "string"
}
}
],
"returns": {
"description": "The predicted (class) probabilities. Returns `null` if any of the given values in the array is a no-data value.",
"description": "A data cube with the predicted (class) probabilities. It removes the specified dimension and adds a dimension for the class probabilities. It has the name `probabilities` and is of type `other`.",
"schema": {
"type": "array",
"items": {
"type": [
"number",
"null"
]
}
"type": "object",
"subtype": "datacube",
"dimensions": [
{
"type": "other"
}
]
}
}
}

0 comments on commit 5e27496

Please sign in to comment.