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

Missing 1 hospitalized #352

Open
jlubken opened this issue Mar 29, 2020 · 1 comment
Open

Missing 1 hospitalized #352

jlubken opened this issue Mar 29, 2020 · 1 comment
Assignees
Labels
bug Something isn't working python qa

Comments

@jlubken
Copy link
Collaborator

jlubken commented Mar 29, 2020

Corey review, confirm, and suggest a solution.

There is an initial hospitalized patient because fitting was done for the date_first_hospitalized or date_first_hospitalized was estimated from doubling_time.

This likely causes an underestimate in growth rate for small marked share, because a single hospitalized patient represents a larger change from zero than in larger market shares.

This shows up later in test_model_cumulative_census:

    # TODO: is 1.0 for ceil function?
    diff = admits.hospitalized[1:-1] - (
        0.05 * 0.05 * (raw_df.infected[1:-1] + raw_df.recovered[1:-1]) - 1.0
    )

Missing a patient during in build_dispositions_df:

def build_dispositions_df(
    raw_df: pd.DataFrame,
    rates: Dict[str, float],
    market_share: float,
    current_date: datetime,
) -> pd.DataFrame:
    """Build dispositions dataframe of patients adjusted by rate and market_share."""
    patients = raw_df.infected + raw_df.recovered
    day = raw_df.day
    return pd.DataFrame({
        "day": day,
        "date": day.astype('timedelta64[D]') + np.datetime64(current_date),
        **{
            key: patients * rate * market_share
            for key, rate in rates.items()
        }
    })
@jlubken
Copy link
Collaborator Author

jlubken commented Mar 29, 2020

@PhilMiller and @cjbayesian Feel free to edit my notes for clarity and accuracy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python qa
Projects
None yet
Development

No branches or pull requests

3 participants