Skip to content

Repository files navigation

Systemic Crisis Prediction in African Countries

Project Overview

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.

Dataset

  • 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

Project Workflow

  1. Data Import & Exploration

    • Load the dataset
    • Display general information and summary statistics
    • Generate a pandas profiling report for deeper insights
  2. 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
  3. Feature Selection & Data Splitting

    • Identify and select the target variable and features
    • Split the dataset into training (80%) and testing (20%) sets
  4. Model Training & Evaluation

    • Train a Random Forest Classifier
    • Evaluate the model using Accuracy Score and Classification Report
    • Hyperparameter tuning with GridSearchCV for model optimization
  5. Performance Improvement Strategies

    • Experiment with alternative models (Logistic Regression, XGBoost, SVM)
    • Apply Feature Selection techniques
    • Address class imbalance using SMOTE if necessary

Installation & Dependencies

To run this project, install the required Python libraries:

pip install pandas numpy matplotlib seaborn scikit-learn pandas-profiling

Running the Project

  1. Clone the repository and navigate to the project folder
  2. Load the dataset into the script
  3. Run the Jupyter Notebook or Python script to execute the workflow

Results & Discussion

  • 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.

Future Enhancements

  • 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.

References


Author: [Macdonald Osakwe]

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages