AbstractScorer 类
所有计分器的基类。
- 继承
-
AbstractScorer
构造函数
AbstractScorer(metric_name: str, task: str, *args: Any, **kwargs: Any)
参数
- metric_name
- task
方法
| calculate_lift |
重写此方法以进行提升计算。 应在不同列上运行的所有不同转换之间进行一次同类比较。 输出应类似于相对分数增加或相对误差改进 |
| is_experiment_better_than_baseline |
重写以提供两个试验输出之间的比较。 |
| is_experiment_score_better |
如果 experiment_score 比 baseline_score_with_mod 好,则返回 true。 |
| score |
重写此方法以进行分数计算。 计算估计器的性能。 |
calculate_lift
重写此方法以进行提升计算。
应在不同列上运行的所有不同转换之间进行一次同类比较。 输出应类似于相对分数增加或相对误差改进
abstract calculate_lift(baseline_score: float, experiment_score: float) -> float
参数
- baseline_score
必需
- experiment_score
必需
is_experiment_better_than_baseline
重写以提供两个试验输出之间的比较。
abstract is_experiment_better_than_baseline(baseline_score: float, experiment_score: float, epsilon: float, **kwargs: Any) -> bool
参数
- baseline_score
必需
基线分数。
- experiment_score
必需
试验分数。
- epsilon
必需
被视为增益/损失的最小增量。
- kwargs
必需
与特定评分器相关的关键字参数。
返回
实验分数是否比基线更好。
is_experiment_score_better
如果 experiment_score 比 baseline_score_with_mod 好,则返回 true。
is_experiment_score_better(baseline_score_with_mod: float, experiment_score: float) -> bool
参数
- baseline_score_with_mod
必需
带有 stat sig mod 的 baseline_score,例如 baseline_score + epsilon
- experiment_score
必需
我们要试验的转换评分,用于确定是否有改进。
score
重写此方法以进行分数计算。
计算估计器的性能。
abstract score(estimator: sklearn.base.BaseEstimator, valid_features: numpy.ndarray, y_actual: numpy.ndarray) -> float
参数
- estimator
必需
- valid_features
必需
- y_actual
必需
反馈
提交和查看相关反馈