Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 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
11 changes: 11 additions & 0 deletions example/job/ml_model.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
Copy link
Author

@PhaniD PhaniD Mar 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example ML model schema. A file is added here with prefix "ml_" to show an example.

The existing JSON schema for model is modified to include ML models https://github.com/Exabyte-io/exabyte-materials-json/pull/24/files#diff-d9fa058c7568fad2c154cae5ae1b8679

"name": "model",
"type": "ml",
"subtype": "supervised",
"references": [
"http://scikit-learn.org/stable/tutorial/machine_learning_map/index.html"
],
"method": {
"...": "include(model/ml_method.json)"
}
}
14 changes: 14 additions & 0 deletions example/job/model/method/ml_workflow.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example ML workflow schema. A file is added here with prefix "ml_" to show an example.

The existing JSON schema for workflow is not modified

"units": [
{
"...": "include(workflow/ml_interface.json)"
},
{
"...": "include(workflow/ml_fit.json)"
},
{
"...": "include(workflow/ml_predict.json)"
}
],
"name": "property-prediction"
}
11 changes: 11 additions & 0 deletions example/job/model/method/workflow/ml_fit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

Copy link
Author

@PhaniD PhaniD Mar 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example ML unit (fit) schema. A file is added here with prefix "ml_" to show an example.

The existing JSON schema for unit is modified to include ML units
https://github.com/Exabyte-io/exabyte-materials-json/pull/24/files#diff-9b527677fbdc8781894e1d6a76da0c70

{
"head": false,
"flowchartId": "2",
"name": "ModelFit",
"type": "fit",
"fit": {
"...": "include(unit/fit.json)"
}

}
9 changes: 9 additions & 0 deletions example/job/model/method/workflow/ml_interface.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example ML unit (interface) schema. A file is added here with prefix "ml_" to show an example.

The existing JSON schema for unit is modified to include ML units
https://github.com/Exabyte-io/exabyte-materials-json/pull/24/files#diff-9b527677fbdc8781894e1d6a76da0c70

"head": true,
"flowchartId": "1",
"name": "MLInterface",
"type": "interface",
"interface": {
"...": "include(unit/interface.json)"
}
}
9 changes: 9 additions & 0 deletions example/job/model/method/workflow/ml_predict.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example ML unit (predict) schema. A file is added here with prefix "ml_" to show an example.

The existing JSON schema for unit is modified to include ML units
https://github.com/Exabyte-io/exabyte-materials-json/pull/24/files#diff-9b527677fbdc8781894e1d6a76da0c70

"head": false,
"flowchartId": "3",
"name": "Predict",
"type": "predict",
"predict": {
"...": "include(unit/predict.json)"
}
}
14 changes: 14 additions & 0 deletions example/job/model/method/workflow/unit/fit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"compute": null,
"input": [
{
"algorithm": "linear_regression",
"fitParameters": [
"sample_weight"
],
"targetProperties":[
"band_gaps"
]
}
]
}
27 changes: 27 additions & 0 deletions example/job/model/method/workflow/unit/interface.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"compute": null,
"input": [
{
"chemicalSystem": [
"Si",
"Ge"
],
"superset": false,
"databases": [
"ExabyteDB"
],
"targetMaterials":[
"Si5Ge11"
],
"features":[
"Si",
"Ge",
"density"
],
"targetProperties":[
"band_gaps"
],
"owner" : "paxJukXpDBiSRjfRZ"
}
]
}
10 changes: 10 additions & 0 deletions example/job/model/method/workflow/unit/predict.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"compute": null,
"input": [
{
"targetProperties":[
"band_gaps"
]
}
]
}
7 changes: 7 additions & 0 deletions example/job/model/ml_method.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example method schema. A file is added here with prefix "ml_" to show an example.

The existing JSON schema for method is modified to include ML methods
https://github.com/Exabyte-io/exabyte-materials-json/pull/24/files#diff-01d16ed8967fedca6691f225bbccf127

"type": "prediction",
"subtype": "linear_regression",
"workflow": {
"...": "include(method/ml_workflow.json)"
}
}
1 change: 1 addition & 0 deletions example/job/theory/ml/model_parameters/input_data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"{\"Si\":{\"c8zG3XcnnTybfP3QQ\":0.6875,\"wWK2XCyivQrG8j34Z\":0.8125},\"Ge\":{\"c8zG3XcnnTybfP3QQ\":0.3125,\"wWK2XCyivQrG8j34Z\":0.1875},\"lattice_volume\":{\"c8zG3XcnnTybfP3QQ\":327.1127749111,\"wWK2XCyivQrG8j34Z\":327.1127749111}}"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example input data for model training. This data is also stored with the trained model

18 changes: 18 additions & 0 deletions example/job/theory/ml/model_parameters/model_parameters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"algorithm": "linear_regression",
"task": "property_prediction",
"property": "band_gaps",
"modelParameters":{
"modelCoefficients":[
-3.339e-01,
2.555e-01,
-1.005e-02
],
"intercept": 0.45,
"score": 0.8,
"modelData" : {
"...": "(include(input_data)"
}

}
}
10 changes: 10 additions & 0 deletions example/job/theory/ml/prediction.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
Copy link
Author

@PhaniD PhaniD Mar 6, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example schema for prediction in ML. Prediction is a type of ML method.

Prediction schema is here:
https://github.com/Exabyte-io/exabyte-materials-json/pull/24/files#diff-8f2aae9a6d339d59c0de7032d64e2e32

"type": "prediction",
"subtype":"linear_regression",
"precision":{
"...": "include(prediction/precision.json)"
},
"data":{
"...": "include(model_parameters/model_parameters.json)"
}
}
3 changes: 3 additions & 0 deletions example/job/theory/ml/prediction/precision.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"score": 0.8
}
3 changes: 3 additions & 0 deletions schema/job/model.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
"oneOf": [
{
"$ref": "file:theory/dft.json"
},
{
"$ref": "file:theory/ml.json"
}
],
"required": [
Expand Down
6 changes: 6 additions & 0 deletions schema/job/model/method.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
},
{
"$ref": "file:../theory/dft/local-orbital.json"
},
{
"$ref": "file:../theory/ml/prediction.json"
},
{
"$ref": "file:../theory/ml/classification.json"
}
],
"required": [
Expand Down
26 changes: 25 additions & 1 deletion schema/job/model/method/workflow/unit.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
"reduce",
"assignment",
"condition",
"exit"
"exit",
"interface",
"fit",
"predict",
"transform"
]
},
"name": {
Expand Down Expand Up @@ -68,6 +72,10 @@
"$ref": "file:unit/_result.json"
}
},
"modelParameters":{
"description": "parameters from Machine Learning model fitting",
"$ref": "file:../../../theory/ml/model_parameters/model_parameters.json"
},
"execution": {
"description": "Contains information about the execution unit..",
"$ref": "file:unit/execution.json"
Expand All @@ -83,6 +91,22 @@
"map": {
"description": "Contains information about the map unit.",
"$ref": "file:unit/map.json"
},
"interface": {
"description": "Contains information about the Machine Learning interface unit.",
"$ref": "file:unit/interface.json"
},
"fit": {
"description": "Contains information about the Machine Learning model fit unit.",
"$ref": "file:unit/fit.json"
},
"predict": {
"description": "Contains information about the Machine Learning property predict unit.",
"$ref": "file:unit/predict.json"
},
"transform": {
"description": "Contains information about the Machine Learning data transform unit.",
"$ref": "file:unit/transform.json"
}
},
"required": [
Expand Down
35 changes: 35 additions & 0 deletions schema/job/model/method/workflow/unit/fit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ML Fit unit schema",
"type": "object",
"properties": {
"input": {
"description": "Unit's input.",
"type": "array",
"items": {
"type": "object",
"properties": {
"algorithm": {
"description": "Algorithm name",
"type": "string"
},
"fitParameters": {
"description": "Additional paramaters used for model fitting",
"type": "array"
},
"targetProperties": {
"description": "Target properties to predict",
"type": "array"
}
},
"required": [
"algorithm",
"targetProperties"
]
}
}
},
"required": [
"input"
]
}
57 changes: 57 additions & 0 deletions schema/job/model/method/workflow/unit/interface.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ML Interface unit schema",
"type": "object",
"properties": {
"input": {
"description": "Unit's input.",
"type": "array",
"items": {
"type": "object",
"properties": {
"trainingMaterials": {
"description": "List of training materials. Eg: ['Si3Ge5', 'SiGe']",
"type": "array"
},
"chemicalSystem": {
"description": "List of elements in chemical system. Eg: ['Si', 'Ge']",
"type": "array"
},
"superset": {
"description": "Input to define the list of materials formed by the elements in chemical system",
"type": "boolean"
},
"databases": {
"description": "List of databases to get data from",
"type": "array"
},
"features": {
"description": "List of features to use in training. Example: descriptive properties",
"type": "array"
},
"targetMaterials": {
"description": "List of target materials. Eg: ['Si3Ge5', 'SiGe']",
"type": "array"
},
"targetProperties": {
"description": "List of target properties",
"type": "array"
},
"owner":{
"description": "Exabyte ID of the material owner",
"type": "string"
}
},
"required": [
"chemicalSystem",
"databases",
"targetMaterials",
"targetProperties"
]
}
}
},
"required": [
"input"
]
}
26 changes: 26 additions & 0 deletions schema/job/model/method/workflow/unit/predict.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ML Predict unit schema",
"type": "object",
"properties": {
"input": {
"description": "Unit's input.",
"type": "array",
"items": {
"type": "object",
"properties": {
"targetProperties": {
"description": "Target properties to predict",
"type": "array"
}
},
"required": [
"targetProperties"
]
}
}
},
"required": [
"input"
]
}
31 changes: 31 additions & 0 deletions schema/job/model/method/workflow/unit/transform.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ML Transform unit schema. No example.

"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ML Transform unit schema",
"type": "object",
"properties": {
"input": {
"description": "Unit's input.",
"type": "array",
"items": {
"type": "object",
"properties": {
"algorithm": {
"description": "Algorithm name",
"type": "string"
},
"fitParameters": {
"description": "Additional paramaters used for model fitting",
"type": "array"
}
},
"required": [
"algorithm",
"fitParameters"
]
}
}
},
"required": [
"input"
]
}
18 changes: 18 additions & 0 deletions schema/job/theory/ml.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "machine learning schema",
"description": "machine learning schema",
"properties": {
"type": {
"enum": [
"ml"
]
},
"subtype": {
"enum": [
"supervised",
"unsupervised"
]
}
}
}
Loading