Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Missing 1 hospitalized

未关闭
#352 1 条评论 0 个 reaction 已指派 2 人 在 GitHub 查看

@PhilMiller 已经在做这个了。

开始于 2020年3月29日。

评估

这个 Issue 还没有评估数据。

描述

bug python qa

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()
        }
    })
主要语言
Python
星标
210
派生
153
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CodeForPhilly/chime 的其他 Issue

查看 CodeForPhilly/chime 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。