"docstring": "Build sparse calibration matrix.\n\nTwo-phase build: (1) simulate each clone and save\nCOO entries to disk, (2) assemble CSR from caches.\n\nArgs:\n geography: GeographyAssignment with state_fips,\n cd_geoid, block_geoid arrays and n_records,\n n_clones attributes.\n sim: Microsimulation for parameters and entity\n relationships.\n target_filter: Dict for target_overview filtering.\n hierarchical_domains: Domain names for\n hierarchical uprating + CD reconciliation.\n cache_dir: Directory for per-clone COO caches.\n If None, COO data held in memory.\n sim_modifier: Optional callback(sim, clone_idx)\n called per clone after state_fips is set but\n before cache clearing. Use for takeup\n re-randomization.\n rerandomize_takeup: If True, use geo-salted\n entity-level takeup draws instead of base h5\n takeup values for takeup-affected targets.\n county_level: If True (default), iterate counties\n within each state during precomputation. If\n False, compute once per state and alias to all\n counties (faster for county-invariant vars).\n\nReturns:\n (targets_df, X_sparse, target_names)",
0 commit comments