peterkros commited on
Commit
b907a4d
·
verified ·
1 Parent(s): 3d73dda

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +177 -0
README.md ADDED
@@ -0,0 +1,177 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Vaccine Stock-Out Prediction Models
2
+
3
+ A comprehensive machine learning system for predicting vaccine stock-out risks across multiple countries and supply chain levels.
4
+
5
+ ## Overview
6
+
7
+ This model collection provides stock-out risk predictions for 8 different vaccine types used in immunization programs worldwide. The models are trained on historical data from multiple countries and can predict stock-out risks at different supply chain levels (Central, Subnational, Local Distribution).
8
+
9
+ ## Supported Vaccines
10
+
11
+ - **BCG** (Bacille Calmette-Guérin) - Tuberculosis vaccine
12
+ - **HepB** (Hepatitis B) - Hepatitis B vaccine
13
+ - **bOPV** (bivalent Oral Polio Vaccine) - Polio vaccine
14
+ - **Penta** (Pentavalent) - Combined vaccine (DTP + HepB + Hib)
15
+ - **PCV** (Pneumococcal Conjugate Vaccine) - Pneumococcal disease vaccine
16
+ - **Rota** (Rotavirus) - Rotavirus vaccine
17
+ - **IPV** (Inactivated Polio Vaccine) - Injectable polio vaccine
18
+ - **TT/Td/DT** (Tetanus Toxoid/Tetanus-Diphtheria) - Tetanus and diphtheria vaccines
19
+
20
+ ## Features
21
+
22
+ - **Multi-country support**: Models trained on data from multiple countries
23
+ - **Supply chain levels**: Supports Central, Subnational, and Local Distribution levels
24
+ - **Population-based**: Considers population size and demographics
25
+ - **Geographic factors**: Incorporates latitude, longitude, and distance metrics
26
+ - **Utilization patterns**: Uses historical utilization data for predictions
27
+ - **Risk assessment**: Provides both binary risk classification and probability scores
28
+
29
+ ## Usage
30
+
31
+ ### Basic Usage
32
+
33
+ ```python
34
+ from vaccine_stockout_predictor import VaccineStockoutPredictor
35
+
36
+ # Initialize the predictor
37
+ predictor = VaccineStockoutPredictor()
38
+
39
+ # Make a prediction
40
+ result = predictor.predict_stockout_risk(
41
+ country_name="Afghanistan",
42
+ sc_level="Subnational",
43
+ store_name="Kabul",
44
+ vaccine_type="BCG",
45
+ current_stock=50000
46
+ )
47
+
48
+ print(result)
49
+ ```
50
+
51
+ ### Example Output
52
+
53
+ ```json
54
+ {
55
+ "vaccine_type": "BCG",
56
+ "country": "Afghanistan",
57
+ "sc_level": "Subnational",
58
+ "store": "Kabul",
59
+ "current_stock": 50000,
60
+ "min_stock": 71980,
61
+ "max_stock": 863763,
62
+ "utilization": 0.063,
63
+ "stockout_risk": 0,
64
+ "risk_probability": 0.12,
65
+ "risk_level": "Low",
66
+ "recommendation": "Stock level adequate. Monitor regularly."
67
+ }
68
+ ```
69
+
70
+ ### Batch Predictions
71
+
72
+ ```python
73
+ # Multiple predictions
74
+ predictions = [
75
+ {
76
+ "country_name": "Afghanistan",
77
+ "sc_level": "Subnational",
78
+ "store_name": "Kabul",
79
+ "vaccine_type": "BCG",
80
+ "current_stock": 50000
81
+ },
82
+ {
83
+ "country_name": "Angola",
84
+ "sc_level": "Central",
85
+ "store_name": "Luanda",
86
+ "vaccine_type": "HepB",
87
+ "current_stock": 10000
88
+ }
89
+ ]
90
+
91
+ results = predictor.batch_predict(predictions)
92
+ ```
93
+
94
+ ## Model Information
95
+
96
+ ### Training Data
97
+ - **Countries**: Multiple countries including Afghanistan, Angola, and others
98
+ - **Time period**: Historical data covering multiple years
99
+ - **Features**: Population, geographic location, utilization patterns, supply chain metrics
100
+ - **Target**: Binary classification (0 = Low risk, 1 = High risk of stock-out)
101
+
102
+ ### Model Performance
103
+ - **Algorithm**: Machine learning models optimized for each vaccine type
104
+ - **Validation**: Cross-validated performance metrics
105
+ - **Features**: Population, distance, utilization, geographic coordinates
106
+
107
+ ## Installation
108
+
109
+ ```bash
110
+ pip install -r requirements.txt
111
+ ```
112
+
113
+ ## Data Requirements
114
+
115
+ The models require the following information for predictions:
116
+
117
+ - **Country Name**: Must match available countries in reference data
118
+ - **Supply Chain Level**: Central, Subnational, or LD (Local Distribution)
119
+ - **Store Name**: Must exist in the reference database
120
+ - **Vaccine Type**: One of the 8 supported vaccine types
121
+ - **Current Stock**: Current inventory level
122
+
123
+ ## Available Data
124
+
125
+ Use the following methods to explore available data:
126
+
127
+ ```python
128
+ predictor = VaccineStockoutPredictor()
129
+
130
+ # Get available vaccines
131
+ vaccines = predictor.get_available_vaccines()
132
+ print(f"Available vaccines: {vaccines}")
133
+
134
+ # Get available countries
135
+ countries = predictor.get_available_countries()
136
+ print(f"Available countries: {countries}")
137
+
138
+ # Get stores in a country
139
+ stores = predictor.get_available_stores("Afghanistan", "Subnational")
140
+ print(f"Stores in Afghanistan (Subnational): {stores[:5]}")
141
+ ```
142
+
143
+ ## Risk Levels
144
+
145
+ - **Low Risk (0)**: Adequate stock levels, low probability of stock-out
146
+ - **High Risk (1)**: Insufficient stock levels, high probability of stock-out
147
+
148
+ ## Recommendations
149
+
150
+ The system provides automated recommendations based on:
151
+ - Current stock levels vs. minimum/maximum thresholds
152
+ - Predicted risk probability
153
+ - Historical utilization patterns
154
+
155
+ ## Limitations
156
+
157
+ - Models are trained on historical data and may not account for sudden changes
158
+ - Predictions assume normal supply chain operations
159
+ - Geographic and demographic factors may vary over time
160
+ - Emergency situations may require manual intervention
161
+
162
+ ## Contributing
163
+
164
+ This model collection is designed for public health applications. For improvements or additional features, please ensure compatibility with existing immunization programs.
165
+
166
+ ## License
167
+
168
+ This project is intended for public health and immunization program support.
169
+
170
+ ## Citation
171
+
172
+ If you use this model in your research or applications, please cite:
173
+
174
+ ```
175
+ Vaccine Stock-Out Prediction Models (2024)
176
+ Multi-country machine learning models for immunization supply chain management
177
+ ```