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

Inf in afb stats #303

Open
robynstuart opened this issue Mar 11, 2024 · 6 comments
Open

Inf in afb stats #303

robynstuart opened this issue Mar 11, 2024 · 6 comments

Comments

@robynstuart
Copy link
Collaborator

spacing_stats_mean is Infinity in https://github.com/fpsim/fpsim/blob/main/tests/baseline.json

This file is generated when update_baselines is run, but the issue seems to be arising somewhere in the extract_birth_spacing method (https://github.com/fpsim/fpsim/blob/main/fpsim/experiment.py#L312)

@robynstuart robynstuart mentioned this issue Mar 11, 2024
14 tasks
@pausz
Copy link
Collaborator

pausz commented Mar 11, 2024

@robynstuart Related issue - i can have a look this week cause i know you're super busy
#286

@emilydriano
Copy link
Collaborator

I will also take a look at this, as I modified the extract_birth_spacing function for the autocalibration PR

@robynstuart robynstuart mentioned this issue Mar 13, 2024
14 tasks
@robynstuart
Copy link
Collaborator Author

@pausz @emilydriano thank you both! I got started with some fixes here: #304

@emilydriano
Copy link
Collaborator

emilydriano commented Mar 13, 2024

@robynstuart @pausz @MObrien-IDM I think the inf we're seeing in the data portion is because the afb.table.csv country data contains many values of 'Inf' in the afb column, which are currently included in the extraction of the ranked afb values (so end up in the 75th percentile). Prior to the autocalibration PR I made (where we saw this baseline affected), both the afb and spacing data were pulled from Senegal's 'BirthSpacing.obj' file...but with standardizing Senegal data to match that of Kenya (and other locations), we changed the data to pull from afb.table.csv and birth_spacing_dhs.csv. My guess is that the data in BirthSpacing.obj didn't have these inf values whereas the data in afb.table.csv does (hence baseline changed in this regard). I'm not sure why this file contains Inf values (missing data perhaps?) but I can exclude these rows if that's preferable.

@emilydriano emilydriano changed the title Inf in spacing stats Inf in afb stats Mar 13, 2024
@MObrien-IDM
Copy link
Contributor

@emilydriano - Okay thanks for looking into this - Let's take a look at the underlying data, but we definitely don't want the Inf included.

@emilydriano
Copy link
Collaborator

Opened this issue which addresses the root cause of the issue above

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

4 participants