Skip to content

Commit

Permalink
Add schema for static linear model
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdewar committed Sep 18, 2024
1 parent 79e8a1f commit 17869cd
Show file tree
Hide file tree
Showing 2 changed files with 164 additions and 0 deletions.
3 changes: 3 additions & 0 deletions schemas/v1/config/models/static.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
},
{
"$ref": "hlm.json"
},
{
"$ref": "staticlinear.json"
}
]
}
161 changes: 161 additions & 0 deletions schemas/v1/config/models/staticlinear.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/imperialCHEPI/healthgps/main/schemas/v1/config/models/staticlinear.json",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"ModelName": {
"const": "StaticLinear"
},
"InformationSpeed": {
"type": "number"
},
"PhysicalActivityStdDev": {
"type": "number"
},
"RuralPrevalence": {
"type": "array",
"items": {
"type": "object",
"properties": {
"Name": {
"type": "string"
},
"Female": {
"type": "number"
},
"Male": {
"type": "number"
}
},
"required": [
"Name",
"Female",
"Male"
],
"additionalProperties": false
}
},
"IncomeModels": {
"type": "object",
"propertyNames": {
"enum": [
"Low",
"Middle",
"High",
"Unknown"
]
},
"additionalProperties": {
"type": "object",
"properties": {
"Intercept": {
"type": "number"
},
"Coefficients": {
"type": "object",
"additionalProperties": {
"type": "number"
}
}
},
"required": [
"Intercept",
"Coefficients"
],
"additionalProperties": false
}
},
"RiskFactorModels": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"Lambda": {
"type": "number"
},
"StdDev": {
"type": "number"
},
"Intercept": {
"type": "number"
},
"Range": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2
},
"Coefficients": {
"additionalProperties": {
"type": "number"
}
},
"Policy": {
"type": "object",
"properties": {
"Intercept": {
"type": "number"
},
"Range": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2
},
"Coefficients": {
"additionalProperties": {
"type": "number"
}
},
"LogCoefficients": {
"additionalProperties": {
"type": "number"
}
}
},
"required": [
"Intercept",
"Range",
"Coefficients",
"LogCoefficients"
],
"additionalProperties": false
}
},
"required": [
"Lambda",
"StdDev",
"Intercept",
"Range",
"Coefficients",
"Policy"
],
"additionalProperties": false
}
},
"RiskFactorCorrelationFile": {
"$ref": "../csv_file.json"
},
"PolicyCovarianceFile": {
"$ref": "../csv_file.json"
}
},
"required": [
"ModelName",
"InformationSpeed",
"PhysicalActivityStdDev",
"RuralPrevalence",
"IncomeModels",
"RiskFactorModels",
"RiskFactorCorrelationFile",
"PolicyCovarianceFile"
],
"additionalProperties": false
}

0 comments on commit 17869cd

Please sign in to comment.