This repository provides scripts for the ecological inference algorithm described in the paper "A Fast Ecological Inference Algorithm for the R×C Case."
-
EM_algorithms.py
Implements the EM algorithm to solve the ecological inference problem (EC). Each proposed method has its own file:EM_full.pyEM_mult.pyEM_pdf.pyEM_cdf.pyEM_simulate.py
-
EM_cluster.py
Specifically designed for running the experiments described in the paper, including comparative analysis of methods. This script clusters instances and applies the EM algorithm to evaluate performance across various settings. Withtext_instances.pyyou can generate the command lines to run these experiments. -
2021_11_Presidencial_Preproc.py
Reproduces the main results from the Chilean presidential election (first round) in November 2021. -
Other Scripts
Perform additional analyses and generate figures and tables for the paper.
Ensure all dependencies are installed before running the scripts. Refer to the paper for methodological details and interpretation of results.