和顺 / 知几 返回所属 Agent
ZJ-06.02

可信范围

原能力

写明哪些判断可支持,哪些因样本、时点或口径不足仍需补证。(细化版 p.4–5)

首选项目

scikit-learn(BSD-3-Clause)。 scikit-learn

匹配范围

校准指标与识别检查报告特定假设下的不确定性。

源码

scikit-learn · def calibration_curve(

sklearn/calibration.py · 1329–1342 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
def calibration_curve(
    y_true,
    y_prob,
    *,
    pos_label=None,
    n_bins="warn",
    strategy="warn",
):
    """Compute true and predicted probabilities for a calibration curve.

    The method assumes the inputs come from a binary classifier, and
    discretize the [0, 1] interval into bins.

    Calibration curves may also be referred to as reliability diagrams.
  • # SPDX-License-Identifier: BSD-3-Clause

DoWhy · def identify_effect(

dowhy/causal_model.py · 234–247 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
    def identify_effect(
        self, estimand_type=None, method_name="default", proceed_when_unidentifiable=None, optimize_backdoor=False
    ):
        """Identify the causal effect to be estimated, using properties of the causal graph.

        :param method_name: Method name for identification algorithm. ("id-algorithm" or "default")
        :param proceed_when_unidentifiable: Binary flag indicating whether identification should proceed in the presence of (potential) unobserved confounders.
        :returns: a probability expression (estimand) for the causal effect if identified, else NULL

        """
        if proceed_when_unidentifiable is None:
            proceed_when_unidentifiable = self._proceed_when_unidentifiable
        if estimand_type is None:
            estimand_type = self._estimand_type

实现与验收要点

区分证据不足、样本不足和估计误差,制定升降级阈值。