Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

found bug - expected total seems to decrease #52

Open
npr99 opened this issue May 21, 2024 · 0 comments
Open

found bug - expected total seems to decrease #52

npr99 opened this issue May 21, 2024 · 0 comments

Comments

@npr99
Copy link
Owner

npr99 commented May 21, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant