Mathematical formulas and methodology behind the predictive models
The Economic Model Visualizer employs a Random Forest Classifier machine learning model to predict economic status based on various economic indicators. The model categorizes economies into three distinct states: Booming, Stable, or Shrinking using GDP growth and inflation data along with derived metrics.
Economic Status | Definition | Criteria |
---|---|---|
Booming | Strong economic growth with controlled inflation | GDP growth ≥ 3.0% AND inflation < 5.0% |
Shrinking | Economic contraction | GDP growth ≤ 0% |
Stable | Moderate growth | All other cases |
While these rules provide the initial classification, the Random Forest model incorporates additional derived features to make more nuanced predictions.
The model utilizes several derived features to improve prediction accuracy.
Growth-Inflation Ratio:
Note: To prevent division by zero, inflation values of 0 are replaced with 0.001
This ratio measures how much economic growth is achieved relative to inflation, helping identify economies with efficient growth.
Economic Health:
This metric captures the real value creation in an economy by accounting for inflation's erosion of nominal growth.
GDP 3-Year Trend:
A positive value indicates improving growth trajectory, while negative suggests deterioration over the 3-year window.
Inflation 3-Year Trend:
Captures the directional movement of inflation, with rising trends potentially signaling future economic challenges.
Growth Stability:
Standard deviation of GDP growth over the past three years. Lower values indicate more stable, predictable growth.
The core predictive model is a Random Forest Classifier with 100 decision trees. This ensemble approach provides robust predictions by aggregating multiple decision trees trained on random subsets of the data.
Features in order of importance to the model's decision making:
Rank | Feature | Importance |
---|---|---|
1 | GDP Growth Rate | ~43% |
2 | Growth-Inflation Ratio | ~14% |
3 | Economic Health | ~14% |
4 | Inflation Rate | ~13% |
5 | GDP 3-Year Trend | ~6% |
6 | Inflation 3-Year Trend | ~5% |
7 | Growth Stability | ~5% |
The future economic outlook projections use a mean-reverting stochastic model with volatility calibrated to historical data.
GDP Growth Projection:
where:
Inflation Projection:
Forecast Confidence:
Confidence decreases by 10% for each year into the future, with a minimum confidence of 50%.
Identification of similar historical economies uses Euclidean distance in the GDP growth and inflation space.
Economy Distance:
Economies with the smallest distance are considered most similar to the input values.
The model demonstrates high accuracy in classifying economies based on the test dataset.
Class | Precision | Recall | F1-Score |
---|---|---|---|
Booming | 0.97 | 0.95 | 0.96 |
Shrinking | 1.00 | 1.00 | 1.00 |
Stable | 0.98 | 0.99 | 0.98 |
Overall Accuracy | 0.98 |
The model uses economic data from 2000-2023 covering 20 major global economies. The primary dataset contains GDP growth rates and inflation rates, with engineered features added during preprocessing.
While the model demonstrates high accuracy in classifying historical economic data, several important limitations should be considered:
This model should be used as one of many tools to inform economic analysis, not as the sole basis for significant economic decisions or policies.
Economic data used in this project comes from the following sources:
All data has been normalized and preprocessed to ensure consistency and quality.