This project aims to predict the likelihood of a systemic crisis in African countries using machine learning techniques. The dataset includes economic indicators such as banking crises, inflation rates, and financial crises from 1860 to 2014 across 13 African countries.
- Source: Kaggle
- Countries Included: Algeria, Angola, Central African Republic, Ivory Coast, Egypt, Kenya, Mauritius, Morocco, Nigeria, South Africa, Tunisia, Zambia, and Zimbabwe
- Target Variable: Systemic Crisis
- Features: Annual inflation rates, financial crisis indicators, debt ratios, and other economic indicators
-
Data Import & Exploration
- Load the dataset
- Display general information and summary statistics
- Generate a pandas profiling report for deeper insights
-
Data Cleaning & Preprocessing
- Handle missing values (drop high-missing columns, fill numerical with median, categorical with mode)
- Remove duplicate rows
- Detect and remove outliers using the IQR method
- Encode categorical variables using Label Encoding
-
Feature Selection & Data Splitting
- Identify and select the target variable and features
- Split the dataset into training (80%) and testing (20%) sets
-
Model Training & Evaluation
- Train a Random Forest Classifier
- Evaluate the model using Accuracy Score and Classification Report
- Hyperparameter tuning with GridSearchCV for model optimization
-
Performance Improvement Strategies
- Experiment with alternative models (Logistic Regression, XGBoost, SVM)
- Apply Feature Selection techniques
- Address class imbalance using SMOTE if necessary
To run this project, install the required Python libraries:
pip install pandas numpy matplotlib seaborn scikit-learn pandas-profiling- Clone the repository and navigate to the project folder
- Load the dataset into the script
- Run the Jupyter Notebook or Python script to execute the workflow
- The Random Forest model provides high accuracy and robustness.
- Feature importance analysis helps in identifying key economic indicators affecting systemic crises.
- Further tuning and alternative models can be explored for better predictions.
- Incorporate additional macroeconomic indicators for better feature representation.
- Deploy the model using a web app (Flask/Django) for interactive usage.
- Use deep learning approaches for more complex pattern recognition.
- Kaggle Dataset
- Machine Learning Algorithms Documentation
Author: [Macdonald Osakwe]