intersect-community-data
intersect-community-data copied to clipboard
found bug - expected total seems to decrease
Issue moved over from: https://github.com/npr99/Labor_Market_Allocation/issues/1
The expected total should be the same across loops of MCMC SA - noticed with block 371559610003026 ( MCMC SA settings: random_accept_threshold = 0.1 start_reduction_threshold = 0.1 max_reduction_threshold = 0.4 seed = 133234) That the expected total decreases from 1205 to 1184 to 1159 to 1147.... This should not happen. It is possible that the random select function has a bug.
Labor_Market_Allocation/pyincoredata_addons/SourceData/lehd_ces_census_gov/lodes_mcmcsa_loops.py
Lines 84 to 99 in 731d71a
Should probably make length_expected using the wac job list not the random selection. But the random selection should always selected the same number - so the error is probably in the random selection process.
Labor_Market_Allocation/pyincoredata_addons/SourceData/lehd_ces_census_gov/lodes_mcmcsa_util.py
Lines 350 to 358 in 731d71a
if k > 2:
seed_k = seedk + k
df = rand_select_jobs(df, seed_k)
# Check if number of jobs selected for each od pair
# matches the expected number of jobs
# New function here
total_mcmcsa[k,1] = calculate_total_fitness(\
Note line 356 in lodes_mcmcsa_util.py references same issue
Try using unique job id It might be that jobidac is not merging correctly and therefore dropping obs