Skip to content

Structured Data for Linear Regression Method

Below, the user can find an example JSON structured representation for the Linear Regression Method.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
{
    "allOf": [
        {
            "schemaId": "method", 
            "required": [
                "type", 
                "subtype"
            ], 
            "properties": {
                "subtype": {
                    "type": "string", 
                    "description": "general subtype of this method, eg. `ultra-soft`"
                }, 
                "type": {
                    "type": "string", 
                    "description": "general type of this method, eg. `pseudopotential`"
                }, 
                "precision": {
                    "type": "object", 
                    "description": "Object showing the actual possible precision based on theory and implementation"
                }, 
                "data": {
                    "type": "object", 
                    "description": "additional data specific to method, eg. array of pseudopotentials"
                }
            }, 
            "title": "method schema (base)"
        }
    ], 
    "schemaId": "methods-directory-regression", 
    "required": [
        "precision", 
        "data"
    ], 
    "title": "linear methods schema", 
    "$schema": "http://json-schema.org/draft-04/schema#", 
    "properties": {
        "subtype": {
            "enum": [
                "least_squares", 
                "ridge"
            ]
        }, 
        "type": {
            "enum": [
                "linear"
            ]
        }, 
        "precision": {
            "perProperty": {
                "items": {
                    "type": "object", 
                    "properties": {
                        "name": {
                            "type": "string", 
                            "description": "property name in 'flattened' format"
                        }
                    }, 
                    "allOf": [
                        {
                            "schemaId": "methods-directory-regression-precision", 
                            "oneOf": [
                                {
                                    "schemaId": "methods-directory-regression-linear-precision-per-property", 
                                    "required": [
                                        "trainingError"
                                    ], 
                                    "properties": {
                                        "score": {
                                            "type": "number", 
                                            "description": "prediction score of the estimator. Eg: r2_score"
                                        }, 
                                        "trainingError": {
                                            "type": "number", 
                                            "description": "training error of the estimator"
                                        }
                                    }, 
                                    "title": "precision schema for regression"
                                }
                            ], 
                            "title": "regression precision"
                        }
                    ]
                }
            }
        }, 
        "data": {
            "perProperty": {
                "items": {
                    "type": "object", 
                    "properties": {
                        "name": {
                            "type": "string", 
                            "description": "property name in 'flattened' format"
                        }
                    }, 
                    "allOf": [
                        {
                            "schemaId": "methods-directory-regression-data", 
                            "oneOf": [
                                {
                                    "schemaId": "methods-directory-regression-linear-data-per-property", 
                                    "required": [
                                        "intercept", 
                                        "perFeature"
                                    ], 
                                    "properties": {
                                        "perFeature": {
                                            "items": {
                                                "required": [
                                                    "name", 
                                                    "coefficient"
                                                ], 
                                                "type": "object", 
                                                "properties": {
                                                    "coefficient": {
                                                        "type": "number", 
                                                        "description": "coefficient in linear regression"
                                                    }, 
                                                    "importance": {
                                                        "type": "number", 
                                                        "description": "pvalue: https://en.wikipedia.org/wiki/P-value"
                                                    }, 
                                                    "name": {
                                                        "type": "string", 
                                                        "description": "feature name in 'flattened' format"
                                                    }
                                                }
                                            }, 
                                            "type": "array", 
                                            "description": "per-feature (property used for training the ML method/model) paramters"
                                        }, 
                                        "intercept": {
                                            "type": "number", 
                                            "description": "intercept (shift) from the linear or non-linear fit of data points"
                                        }
                                    }, 
                                    "title": "linear regression parameters schema"
                                }
                            ], 
                            "title": "regression data"
                        }
                    ]
                }
            }, 
            "dataSet": {
                "schemaId": "methods-directory-regression-dataset", 
                "required": [
                    "exabyteIds"
                ], 
                "type": "object", 
                "description": "dataset for ml", 
                "properties": {
                    "exabyteIds": {
                        "items": {
                            "type": "string"
                        }, 
                        "type": "array", 
                        "description": "array of exabyteIds for materials in dataset"
                    }, 
                    "extra": {
                        "description": "holder for any extra information, eg. coming from user-uploaded CSV file"
                    }
                }
            }
        }
    }
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
{
    "subtype": "least_squares", 
    "data": {
        "perProperty": [
            {
                "perFeature": [
                    {
                        "coefficient": 0.015, 
                        "importance": 0.134, 
                        "name": "atomic_radius:Ge"
                    }, 
                    {
                        "coefficient": 0.016, 
                        "importance": 0.135, 
                        "name": "atomic_radius:Si"
                    }
                ], 
                "intercept": 0.363, 
                "name": "band_gaps:direct"
            }, 
            {
                "perFeature": [
                    {
                        "coefficient": 0.016, 
                        "importance": 0.135, 
                        "name": "atomic_radius:Ge"
                    }, 
                    {
                        "coefficient": 0.017, 
                        "importance": 0.136, 
                        "name": "atomic_radius:Si"
                    }
                ], 
                "intercept": 0.364, 
                "name": "band_gaps:indirect"
            }
        ], 
        "dataSet": {
            "exabyteIds": [
                "LCthJ6E2QabYCZqf4", 
                "LCthJ6E2QabYCZqf5", 
                "LCthJ6E2QabYCZqf6", 
                "LCthJ6E2QabYCZqf7", 
                "LCthJ6E2QabYCZqf8", 
                "LCthJ6E2QabYCZqf9", 
                "LCthJ6E2QabYCZq10", 
                "LCthJ6E2QabYCZq11"
            ], 
            "extra": {}
        }
    }, 
    "precision": {
        "perProperty": {
            "score": 0.8, 
            "name": "band_gaps:direct", 
            "trainingError": 0.002
        }
    }, 
    "type": "linear"
}