Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- .ipynb_checkpoints/implementation-checkpoint.ipynb +0 -0
- .tool-versions +1 -0
- README.md +1 -0
- bayesian_network_analysis.png +3 -0
- bayesian_network_model.pkl +3 -0
- bayesian_network_training.log +0 -0
- implementation.ipynb +0 -0
- inference_results.json +66 -0
- model_summary.json +40 -0
- processed_iris_data.csv +151 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
bayesian_network_analysis.png filter=lfs diff=lfs merge=lfs -text
|
.ipynb_checkpoints/implementation-checkpoint.ipynb
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
.tool-versions
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
python 3.13.5t
|
README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
# Bayesian-Networks
|
bayesian_network_analysis.png
ADDED
|
Git LFS Details
|
bayesian_network_model.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a4e180efda1b490e3abcb06fb098c9025e81ef0383116de0078e552dbbb0c8ac
|
| 3 |
+
size 2755
|
bayesian_network_training.log
ADDED
|
File without changes
|
implementation.ipynb
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
inference_results.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"large_petals": {
|
| 3 |
+
"evidence": {
|
| 4 |
+
"Petal_Length": 2,
|
| 5 |
+
"Petal_Width": 2
|
| 6 |
+
},
|
| 7 |
+
"probabilities": [
|
| 8 |
+
0.0,
|
| 9 |
+
0.04347826086956522,
|
| 10 |
+
0.9565217391304348
|
| 11 |
+
],
|
| 12 |
+
"species_names": [
|
| 13 |
+
"Setosa",
|
| 14 |
+
"Versicolor",
|
| 15 |
+
"Virginica"
|
| 16 |
+
]
|
| 17 |
+
},
|
| 18 |
+
"small_petals": {
|
| 19 |
+
"evidence": {
|
| 20 |
+
"Petal_Length": 0,
|
| 21 |
+
"Petal_Width": 0
|
| 22 |
+
},
|
| 23 |
+
"probabilities": [
|
| 24 |
+
1.0,
|
| 25 |
+
0.0,
|
| 26 |
+
0.0
|
| 27 |
+
],
|
| 28 |
+
"species_names": [
|
| 29 |
+
"Setosa",
|
| 30 |
+
"Versicolor",
|
| 31 |
+
"Virginica"
|
| 32 |
+
]
|
| 33 |
+
},
|
| 34 |
+
"medium_sepals": {
|
| 35 |
+
"evidence": {
|
| 36 |
+
"Sepal_Length": 1,
|
| 37 |
+
"Sepal_Width": 1
|
| 38 |
+
},
|
| 39 |
+
"probabilities": [
|
| 40 |
+
0.12443438914027151,
|
| 41 |
+
0.6312217194570137,
|
| 42 |
+
0.24434389140271492
|
| 43 |
+
],
|
| 44 |
+
"species_names": [
|
| 45 |
+
"Setosa",
|
| 46 |
+
"Versicolor",
|
| 47 |
+
"Virginica"
|
| 48 |
+
]
|
| 49 |
+
},
|
| 50 |
+
"mixed_features": {
|
| 51 |
+
"evidence": {
|
| 52 |
+
"Sepal_Length": 2,
|
| 53 |
+
"Petal_Length": 0
|
| 54 |
+
},
|
| 55 |
+
"probabilities": [
|
| 56 |
+
NaN,
|
| 57 |
+
NaN,
|
| 58 |
+
NaN
|
| 59 |
+
],
|
| 60 |
+
"species_names": [
|
| 61 |
+
"Setosa",
|
| 62 |
+
"Versicolor",
|
| 63 |
+
"Virginica"
|
| 64 |
+
]
|
| 65 |
+
}
|
| 66 |
+
}
|
model_summary.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "Discrete Bayesian Network",
|
| 3 |
+
"dataset": "Iris (discretized)",
|
| 4 |
+
"nodes": [
|
| 5 |
+
"Species",
|
| 6 |
+
"Sepal_Length",
|
| 7 |
+
"Sepal_Width",
|
| 8 |
+
"Petal_Length",
|
| 9 |
+
"Petal_Width"
|
| 10 |
+
],
|
| 11 |
+
"edges": [
|
| 12 |
+
[
|
| 13 |
+
"Species",
|
| 14 |
+
"Sepal_Length"
|
| 15 |
+
],
|
| 16 |
+
[
|
| 17 |
+
"Species",
|
| 18 |
+
"Sepal_Width"
|
| 19 |
+
],
|
| 20 |
+
[
|
| 21 |
+
"Species",
|
| 22 |
+
"Petal_Length"
|
| 23 |
+
],
|
| 24 |
+
[
|
| 25 |
+
"Species",
|
| 26 |
+
"Petal_Width"
|
| 27 |
+
],
|
| 28 |
+
[
|
| 29 |
+
"Petal_Length",
|
| 30 |
+
"Petal_Width"
|
| 31 |
+
]
|
| 32 |
+
],
|
| 33 |
+
"accuracy": 0.8444444444444444,
|
| 34 |
+
"data_shape": [
|
| 35 |
+
150,
|
| 36 |
+
5
|
| 37 |
+
],
|
| 38 |
+
"num_parameters": 57,
|
| 39 |
+
"inference_scenarios": 4
|
| 40 |
+
}
|
processed_iris_data.csv
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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