Spaces:
Build error
Build error
atodorov284 commited on
Commit ·
1b80238
1
Parent(s): 88b8e22
Format code for flake8
Browse files- .vs/ProjectSettings.json +0 -3
- .vs/VSWorkspaceState.json +0 -6
- .vs/air-quality-forecast/v16/.suo +0 -0
- .vs/slnx.sqlite +0 -0
- .vscode/launch.json +0 -19
- .vscode/tasks.json +0 -26
- extra_scripts/shap_values.py +5 -8
.vs/ProjectSettings.json
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"CurrentProjectSetting": null
|
| 3 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
.vs/VSWorkspaceState.json
DELETED
|
@@ -1,6 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"ExpandedNodes": [
|
| 3 |
-
""
|
| 4 |
-
],
|
| 5 |
-
"PreviewInSolutionExplorer": false
|
| 6 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.vs/air-quality-forecast/v16/.suo
DELETED
|
Binary file (11.8 kB)
|
|
|
.vs/slnx.sqlite
DELETED
|
Binary file (262 kB)
|
|
|
.vscode/launch.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"configurations": [
|
| 3 |
-
{
|
| 4 |
-
"name": "Docker: Python - General",
|
| 5 |
-
"type": "docker",
|
| 6 |
-
"request": "launch",
|
| 7 |
-
"preLaunchTask": "docker-run: debug",
|
| 8 |
-
"python": {
|
| 9 |
-
"pathMappings": [
|
| 10 |
-
{
|
| 11 |
-
"localRoot": "${workspaceFolder}",
|
| 12 |
-
"remoteRoot": "/app"
|
| 13 |
-
}
|
| 14 |
-
],
|
| 15 |
-
"projectType": "general"
|
| 16 |
-
}
|
| 17 |
-
}
|
| 18 |
-
]
|
| 19 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.vscode/tasks.json
DELETED
|
@@ -1,26 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"version": "2.0.0",
|
| 3 |
-
"tasks": [
|
| 4 |
-
{
|
| 5 |
-
"type": "docker-build",
|
| 6 |
-
"label": "docker-build",
|
| 7 |
-
"platform": "python",
|
| 8 |
-
"dockerBuild": {
|
| 9 |
-
"tag": "airqualityforecast:latest",
|
| 10 |
-
"dockerfile": "${workspaceFolder}/Dockerfile",
|
| 11 |
-
"context": "${workspaceFolder}",
|
| 12 |
-
"pull": true
|
| 13 |
-
}
|
| 14 |
-
},
|
| 15 |
-
{
|
| 16 |
-
"type": "docker-run",
|
| 17 |
-
"label": "docker-run: debug",
|
| 18 |
-
"dependsOn": [
|
| 19 |
-
"docker-build"
|
| 20 |
-
],
|
| 21 |
-
"python": {
|
| 22 |
-
"file": "air-quality-forecast\\model_development.py"
|
| 23 |
-
}
|
| 24 |
-
}
|
| 25 |
-
]
|
| 26 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extra_scripts/shap_values.py
CHANGED
|
@@ -1,5 +1,3 @@
|
|
| 1 |
-
import os
|
| 2 |
-
import sys
|
| 3 |
from prediction import PredictorModels
|
| 4 |
import pandas as pd
|
| 5 |
import shap
|
|
@@ -54,17 +52,16 @@ if __name__ == "__main__":
|
|
| 54 |
|
| 55 |
shap_values = explainer.shap_values(x_test)
|
| 56 |
n_outputs = shap_values.shape[2]
|
| 57 |
-
|
| 58 |
-
|
| 59 |
for i in range(n_outputs):
|
| 60 |
print(f"Generating summary plot for {output_features[i]}")
|
| 61 |
plt.figure(figsize=(33, 16))
|
| 62 |
-
|
| 63 |
shap.summary_plot(shap_values[:, :, i], x_test, plot_type="dot", show=False)
|
| 64 |
-
|
| 65 |
plt.title(f"SHAP Summary Plot for {output_features[i]}")
|
| 66 |
-
|
| 67 |
plt.savefig(f"shap_summary_plot_{output_features[i].replace(' ', '_').replace('-', '')}.png", format='png', dpi=300, bbox_inches='tight')
|
| 68 |
-
|
| 69 |
plt.close()
|
| 70 |
"""
|
|
|
|
|
|
|
|
|
|
| 1 |
from prediction import PredictorModels
|
| 2 |
import pandas as pd
|
| 3 |
import shap
|
|
|
|
| 52 |
|
| 53 |
shap_values = explainer.shap_values(x_test)
|
| 54 |
n_outputs = shap_values.shape[2]
|
| 55 |
+
|
|
|
|
| 56 |
for i in range(n_outputs):
|
| 57 |
print(f"Generating summary plot for {output_features[i]}")
|
| 58 |
plt.figure(figsize=(33, 16))
|
| 59 |
+
|
| 60 |
shap.summary_plot(shap_values[:, :, i], x_test, plot_type="dot", show=False)
|
| 61 |
+
|
| 62 |
plt.title(f"SHAP Summary Plot for {output_features[i]}")
|
| 63 |
+
|
| 64 |
plt.savefig(f"shap_summary_plot_{output_features[i].replace(' ', '_').replace('-', '')}.png", format='png', dpi=300, bbox_inches='tight')
|
| 65 |
+
|
| 66 |
plt.close()
|
| 67 |
"""
|