estimator_checks_generator#
- sklearn.utils.estimator_checks.estimator_checks_generator(estimator, *, legacy: bool = True, expected_failed_checks: dict[str, str] | None = None, mark: Literal['xfail', 'skip', None] = None)[源代码]#
迭代生成估计器的所有可调用检查。
Added in version 1.6.
- 参数:
- estimator估计器对象
要为其生成检查的估计实例。
- legacy布尔,默认=True
是否包括遗留检查。随着时间的推移,我们将支票从此类别中删除并将其移至其特定类别中。
- expected_failed_checksdict [str, str] ,默认=无
形式为{check_Name:reason}的字典,用于预计失败的检查。
- mark{“xfail”,“skip”}或无,默认=无
是否将预计失败的检查标记为xfail (
pytest.mark.xfail
)或跳过。将测试标记为“跳过”是通过将检查包装在引发SkipTest
例外.
- 返回:
- estimator_checks_generator发生器
产生(估计器、检查)二元组的生成器。