Analysing Population Synthesis

Analysing Population Synthesis#

In this example we show how to examine the performance of the Population Synthesizer.

sphinx_gallery_thumbnail_path = ‘../../examples/result_analysis/pop_synth.png’

from pathlib import Path

from polaris.analyze.popsyn_analysis import PopsynComparator
from polaris.utils.logging_utils import stdout_logging  # noqa: E402

stdout_logging()
project_dir = Path("/tmp/Bloomington")
iteration_folder = project_dir / "Bloomington_iteration_4"
sample_factor = 0.25
comp = PopsynComparator(iteration_folder, sample_factor)
comp.summarise()

Comparison against controls#

When examining the below plots, the column title refers to the kind of control variable - household (HH) or person (PERSON) level. Note that columns starting with TEST are not directly controlled to.

PUMA level#

Note that linear regression stats will be meaningless for a model with one PUMA only, as is the case here.

comp.generate_comparison_plots(geo_level=1)

Tract level#

comp.generate_comparison_plots(geo_level=0)

Gallery generated by Sphinx-Gallery