How Machine Learning Discovered Democracy

An Interactive Journey Through Unsupervised Clustering of Political Regimes

By Rosalina Torres, Data Analytics Engineering, MS Candidate
01

The Raw Political Data

The Economist Intelligence Unit's Democracy Index measures political systems worldwide using five key dimensions:

  • Electoral Process and Pluralism: Free and fair elections, universal suffrage
  • Functioning of Government: Checks and balances, transparency
  • Political Participation: Voter turnout, citizen engagement
  • Political Culture: Democratic values, peaceful transitions
  • Civil Liberties: Free speech, association, rule of law

For my analysis, I removed all regime classifications and labels, giving the machine learning algorithms access only to the raw dimension scores. This created a truly unsupervised learning scenario - could AI identify meaningful political patterns on its own?

02

The Unsupervised Approach

Unsupervised machine learning allows us to discover patterns without predetermined labels. I applied multiple clustering algorithms to the democracy data:

Hierarchical Clustering

This algorithm builds a tree of clusters, grouping countries based on their similarity. It excelled at capturing the nuanced relationships between different democratic systems, achieving the highest alignment with expert regime classifications.

Before clustering, data was standardized to ensure all dimensions contributed equally to the analysis. This let the natural structure emerge without bias toward any particular dimension.

03

The Amazing Discovery

Without being told about democratic regime types, the machine learning algorithms naturally discovered four distinct clusters that closely match expert classifications!

Adjusted Rand Index (ARI) measures similarity between clusterings
Hierarchical Clustering
0.78
K-Means
0.57

Higher ARI values indicate better alignment with expert classifications (max = 1.0)

04

The US Democracy Downgrade

One of the most significant findings revealed by the clustering analysis was the confirmation of the United States' downgrade from a Full Democracy to a Flawed Democracy. This transition, which occurred in 2016, was independently detected by the machine learning algorithm.

Dimensional Analysis: US vs Norway

While the US maintains strong scores in Electoral Process (9.17) and Civil Liberties (8.24), it shows significant weaknesses in:

  • Functioning of Government: 6.43 (vs. Norway's 9.64)
  • Political Culture: 6.25 (vs. Norway's 10.00)

These dimensional gaps are precisely what the machine learning algorithms detected, placing the US firmly in a different cluster than full democracies.

05

The Critical Dimensions

Not all democratic dimensions were equally important in clustering countries. The machine learning algorithms revealed which aspects most strongly differentiate political regimes:

Civil Liberties
0.90
Electoral Process
0.86
Functioning of Government
0.75
Political Culture
0.72
Political Participation
0.64

Feature importance was derived from the clustering algorithms' sensitivity to each dimension.

06

Discovering Borderline Cases

One of the most fascinating discoveries was identifying countries that exist at the boundaries between regime types. These borderline cases reveal political systems in transition or with unique characteristics that don't fit neatly into a single category.

The machine learning model assigned these countries probability scores for belonging to different clusters, revealing their ambiguous status.

Hungary

Officially classified as a Flawed Democracy, but machine learning detected characteristics of a Hybrid Regime.

53% Flawed Democracy 47% Hybrid Regime

Poland

Despite its Flawed Democracy label, machine learning found significant Hybrid Regime patterns.

51% Flawed Democracy 49% Hybrid Regime

Mexico

Officially a Flawed Democracy but showing strong indicators of Hybrid Regime characteristics.

48% Flawed Democracy 52% Hybrid Regime
07

Key Research Insights

Natural Patterns in Political Data

Unsupervised machine learning naturally discovered four distinct clusters that closely align with expert-defined regime types. This validates that democratic classifications reflect inherent patterns in political data.

Hierarchical Classification Works Best

Hierarchical clustering outperformed other algorithms, suggesting that democratic systems exist in a nested relationship rather than as completely separate categories. Democracy exists on a spectrum, not in discrete boxes.

Data-Driven Early Warning System

Machine learning discovered borderline cases before political scientists recognized their ambiguous status. This suggests AI could serve as an early warning system for democratic backsliding or advancement.

When treated with care, data can speak — and sometimes, it echoes justice

What's most remarkable isn't simply that machines can classify regimes—it's that they can discover the inherent structure of democracy independently, with no human guidance.

This adds a powerful new perspective to political science: the patterns of democracy are not merely human constructs, but are embedded in the data itself.

Return to Main Dashboard