|
1 | 1 | # Covid-19 Daily Cases Prediction in Malaysia |
2 | 2 |
|
3 | | -This project aims to forecast the number of Covid-19 daily cases in Malaysia. The daily cases data are obtained from the [Ministry of Health Malaysia's GitHub Repo](https://github.com/MoH-Malaysia/covid19-public). |
4 | | - |
5 | | -## Build With: |
6 | | - |
7 | | -<p align="left"> <a href="https://www.python.org" target="_blank" rel="noreferrer"> <img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/python/python-original.svg" alt="python" width="40" height="40"/> <a href="https://www.tensorflow.org" target="_blank" rel="noreferrer"> <img src="https://www.vectorlogo.zone/logos/tensorflow/tensorflow-icon.svg" alt="tensorflow" width="40" height="40"/> </a> <a href="https://scikit-learn.org/" target="_blank" rel="noreferrer"> <img src="https://upload.wikimedia.org/wikipedia/commons/0/05/Scikit_learn_logo_small.svg" alt="scikit_learn" width="40" height="40"/> </a> <a href="https://pandas.pydata.org/" target="_blank" rel="noreferrer"> <img src="https://raw.githubusercontent.com/devicons/devicon/2ae2a900d2f041da66e950e4d48052658d850630/icons/pandas/pandas-original.svg" alt="pandas" width="40" height="40"/> </a> |
| 3 | +The COVID-19 pandemic has been a major public health crisis in Malaysia, with thousands of new cases reported every day. This project aims to use deep learning models to predict the number of new COVID-19 cases in Malaysia. The daily cases data are obtained from the [Ministry of Health Malaysia's GitHub Repo](https://github.com/MoH-Malaysia/covid19-public), which provides up-to-date data on the number of new COVID-19 cases in Malaysia. |
| 4 | + |
| 5 | +## Build With |
| 6 | + |
| 7 | +<p align="left"> |
| 8 | + <a href="https://www.python.org" target="_blank" rel="noreferrer"> |
| 9 | + <img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/python/python-original.svg" alt="python" width="40" height="40"/> |
| 10 | + </a> |
| 11 | + <a href="https://www.tensorflow.org" target="_blank" rel="noreferrer"> |
| 12 | + <img src="https://www.vectorlogo.zone/logos/tensorflow/tensorflow-icon.svg" alt="tensorflow" width="40" height="40"/> |
| 13 | + </a> |
| 14 | + <a href="https://scikit-learn.org/" target="_blank" rel="noreferrer"> |
| 15 | + <img src="https://upload.wikimedia.org/wikipedia/commons/0/05/Scikit_learn_logo_small.svg" alt="scikit_learn" width="40" height="40"/> |
| 16 | + </a> |
| 17 | + <a href="https://pandas.pydata.org/" target="_blank" rel="noreferrer"> |
| 18 | + <img src="https://raw.githubusercontent.com/devicons/devicon/2ae2a900d2f041da66e950e4d48052658d850630/icons/pandas/pandas-original.svg" alt="pandas" width="40" height="40"/> |
| 19 | + </a> |
| 20 | + <a href="https://numpy.org/" target="_blank" rel="noreferrer"> |
| 21 | + <img src="https://raw.githubusercontent.com/devicons/devicon/master/icons/numpy/numpy-original.svg" alt="numpy" width="40" height="40"/> |
| 22 | + </a> |
| 23 | + <a href="https://matplotlib.org/" target="_blank" rel="noreferrer"> |
| 24 | + <img src="https://upload.wikimedia.org/wikipedia/en/5/56/Matplotlib_logo.svg" alt="matplotlib" width="40" height="40"/> |
| 25 | + </a> |
| 26 | + <a href="https://code.visualstudio.com/" target="_blank" rel="noreferrer"> |
| 27 | + <img src="https://upload.wikimedia.org/wikipedia/commons/9/9a/Visual_Studio_Code_1.35_icon.svg" alt="vscode" width="40" height="40"/> |
| 28 | + </a> |
| 29 | +</p> |
8 | 30 |
|
9 | 31 | ## Directory Structure |
10 | 32 |
|
11 | 33 | 1. [datasets](https://github.com/M-ImranIsmael/Deep_Learning_Applications/tree/master/covid_cases_prediction/datasets): |
12 | 34 |
|
13 | | - - cases_malaysia_test.csv |
14 | | - - cases_malaysia_train.csv |
| 35 | + - cases_malaysia_train.csv: for model training |
| 36 | + - cases_malaysia_test.cs: for model testing |
15 | 37 |
|
16 | 38 | 2. [training.py](https://github.com/M-ImranIsmael/Deep_Learning_Applications/blob/master/covid_cases_prediction/imran_training.py): |
17 | 39 |
|
18 | 40 | - Importing necessary libraries |
19 | | - - Loading and cleaning the data and EDA |
| 41 | + - Loading, EDA, and data cleaning |
20 | 42 | - Model selection and training using LSTM model |
21 | 43 | - Model saving and testing on new datasets |
22 | 44 |
|
23 | 45 | 3. [model_and_pickle](https://github.com/M-ImranIsmael/Deep_Learning_Applications/tree/master/covid_cases_prediction/model_and_pickle): trained deep learning model and pickle file for mms |
24 | 46 |
|
25 | 47 | 4. [pictures](https://github.com/M-ImranIsmael/Deep_Learning_Applications/tree/master/covid_cases_prediction/pictures): plots and results |
26 | 48 |
|
27 | | -## Results |
| 49 | +# Results |
28 | 50 |
|
29 | | -### Daily New COVID-19 Cases in Malaysia Plot |
| 51 | +## Daily New COVID-19 Cases in Malaysia Plot |
30 | 52 |
|
31 | 53 |  |
32 | 54 |
|
33 | | -### LSTM Model Architecture |
| 55 | +## LSTM Model Architecture |
| 56 | + |
| 57 | +The architecture consists of two LSTM layers with 64 units each, followed by a dropout layer to help prevent overfitting. The output of the second LSTM layer is then fed into a dense layer with a linear activation function that produces a single output value. |
| 58 | + |
| 59 | +Here is a summary of the model architecture: |
34 | 60 |
|
35 | 61 |  |
36 | 62 |
|
37 | | -### Tensorboard Result |
| 63 | +## Tensorboard Result |
| 64 | + |
| 65 | +The two plots below show the training progress of the LSTM model using TensorBoard. |
38 | 66 |
|
| 67 | +The first plot shows the epoch loss for both the training and validation datasets. The loss is calculated as the difference between the predicted and actual values for each time step. |
39 | 68 |  |
| 69 | + |
| 70 | +The second plot shows the epoch mean squared error (MSE) for both the training and validation datasets. MSE is another metric used to evaluate the performance of a regression model. |
| 71 | + |
40 | 72 |  |
41 | 73 |
|
42 | | -### Actual vs Predicted Covid-19 Cases |
| 74 | +## Actual vs Predicted Covid-19 Cases |
| 75 | + |
| 76 | +The plot shows the actual daily Covid-19 cases in Malaysia versus the predicted daily cases generated by the trained LSTM model. |
| 77 | + |
| 78 | +Overall, the model seems to capture the trend in the data, but there is still room for improvement in the model's predictive accuracy. |
43 | 79 |
|
44 | 80 |  |
45 | 81 |
|
46 | | -### Model Reports |
| 82 | +## Model Reports |
| 83 | + |
| 84 | +The accuracy of the model is evaluated using metrics such as mean squared error (MSE), mean absolute percentage error (MAPE), and R-squared score. |
47 | 85 |
|
48 | 86 |  |
49 | 87 |
|
50 | | -## Acknowledgment of Data |
| 88 | +# Acknowledgment of Data |
51 | 89 |
|
52 | 90 | The dataset used in this project was obtained from: |
53 | 91 | [Ministry of Health Malaysia's GitHub Repo](https://github.com/MoH-Malaysia/covid19-public). |
| 92 | +The Ministry of Health (MoH) is a governmental organization in Malaysia responsible for managing the country's health system, including public health, medical research, health promotion, and patient safety. |
0 commit comments