IMF Neural Dashboard &MacroVision By Prof.Eldirdiri F.Ibrahim et Dr.Afaf Babiker
Description
Description of the Dataset The dataset used in this study was derived from publicly available IMF data, representing a snapshot of selected macroeconomic indicators across multiple countries. It was compiled to include recent historical data, covering variables that reflect economic health and government fiscal stability. The key features of the dataset include: Country – Name of the country to which the data point belongs. This enables cross-country comparisons. Year – The specific year for which the indicator values were recorded, allowing for longitudinal (time-series) analysis. gdp_usd_billion – Gross Domestic Product measured in billions of US dollars. This is a standard measure of economic output and is essential for comparing the relative size of economies. inflation_rate – Annual inflation rate expressed as a percentage, reflecting the rate at which the general level of prices for goods and services is rising, and subsequently, the erosion of purchasing power. unemployment_rate – Percentage of the labor force that is unemployed. This is a critical social and economic indicator of labor market health. government_debt_pct_gdp – Government debt as a percentage of GDP, which indicates the fiscal leverage of a country and its potential vulnerability to financial crises. The dataset was gathered from IMF reports and databases using structured downloads in CSV format, ensuring a clean, machine-readable dataset suitable for analysis in Python or other data analysis tools. Data cleaning steps included: Removing or imputing missing values to prevent modeling bias. Standardizing column names for consistency. Converting data types to numerical formats for statistical and neural network analysis. Scaling numeric features to ensure comparability for machine learning models. <class 'pandas.core.frame.DataFrame'> RangeIndex: 50 entries, 0 to 49 Data columns (total 7 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 id 50 non-null int64 1 country 50 non-null object 2 year 50 non-null int64 3 gdp_usd_billion 50 non-null float64 4 inflation_rate 50 non-null float64 5 unemployment_rate 50 non-null float64 6 government_debt_pct_gdp 50 non-null float64 dtypes: float64(4), int64(2), object(1) memory usage: 2.9+ KB None أول 5 صفوف: id country year gdp_usd_billion inflation_rate unemployment_rate \ 0 8 Brazil 2015 1524.14 5.08 4.46 1 6 China 2015 1769.84 6.50 8.11 2 4 France 2015 2236.61 1.10 11.71 3 3 Germany 2015 1094.90 8.76 3.48 4 7 India 2015 2174.82 6.88 13.48 government_debt_pct_gdp 0
Files
Steps to reproduce
Steps to Reproduce: Comprehensive Guide for IMF Macroeconomic Data Analysis Using Neural Networks This document provides a detailed, step-by-step guide to reproduce the analysis of IMF macroeconomic data, including all preprocessing, visualization, predictive modeling, and reporting steps. The goal is to make the entire workflow transparent and reproducible, enabling researchers, data scientists, and policymakers to replicate the study or adapt it to new datasets. 1. Environment Setup Reproducibility begins with a consistent environment. Using Python 3.9+ is recommended, as it ensures compatibility with the latest versions of machine learning and data visualization libraries. 1.1 Install Python Download and install Python from https://www.python.org/downloads/ . Ensure that you check the option to Add Python to PATH during installation. 1.2 Create a Virtual Environment (Optional but Recommended) A virtual environment isolates the project dependencies to avoid conflicts with other Python projects. Execute the following commands: 1.3 Install Required Libraries 1.4 Verify Installation 2. Dataset Acquisition 3. Loading and Inspecting the Data 4. Data Cleaning and Preprocessing 4.1 Handle Missing Values 4.2 Detect Outliers 4.3 Feature Scaling 5. Splitting the Data 6. Building the Neural Network 6.1 Compile the Model 6.2 Early Stopping 7. Training the Neural Network Validation split: 20% of training data used for validation. Epochs: Maximum 200; training may stop earlier due to early stopping. Batch size: 16 samples per gradient update. 8. Evaluating Model Performance 8.1 Plotting Training History 9. Generating Predictions 10. Visualizing Predictions vs Actual Values 11. Country-Level Summaries 12. Saving and Organizing Outputs 13. Optional Advanced Steps Hyperparameter Tuning: Experiment with number of layers, neurons, activation functions, batch sizes, and optimizers to improve performance. Feature Engineering: Add additional macroeconomic indicators, lagged variables, or interaction terms. Time-Series Forecasting: Extend the model to include historical sequences for temporal predictions. Clustering Analysis: Group countries by similar economic profiles using unsupervised methods (e.g., k-means). 14. Reproducibility Notes Random Seeds: Always set random_state in train-test split to reproduce the same data partitions. Library Versions: Record library versions to ensure consistent results. Data Updates: If replacing the dataset with newer IMF data, maintain the same column names and preprocessing steps. Environment: Consider saving your virtual environment configuration: ummary By following these steps: The dataset can be cleaned, explored, visualized, and analyzed. A multi-output neural network can be trained to predict all key macroeconomic indicators simultaneously. Predictions, evaluation metrics, and visualizations can be saved in an organized folder. The workflow is fully reproducible, adaptable, and extendable to other datasets or models.