ColumnPurposeSweeper 类

AutoML 试验期间用于扫描列用途的方法和类。

继承
builtins.object
ColumnPurposeSweeper

构造函数

ColumnPurposeSweeper()

方法

is_feature_type_convertible

是否支持特征类型转换。

目前,如果数值或日期/时间的自动化 ML 转换属于不受支持的 dtype,则转换可能会失败。示例 1:数值类型将进行数值转换。 如果字符串列被强制为数值特征类型,则应会阻止转换。 示例 2:日期/时间类型将进行日期/时间转换。 如果值不包含有效的日期/时间格式,则可能会导致转换器失败,因此系统会阻止转换的进行。

safe_convert_on_data_type

为数据类型提供可能的安全类型列转换选项。

safe_convert_on_feature_type

为特征类型提供可能的安全类型列转换选项。

is_feature_type_convertible

是否支持特征类型转换。

目前,如果数值或日期/时间的自动化 ML 转换属于不受支持的 dtype,则转换可能会失败。示例 1:数值类型将进行数值转换。 如果字符串列被强制为数值特征类型,则应会阻止转换。 示例 2:日期/时间类型将进行日期/时间转换。 如果值不包含有效的日期/时间格式,则可能会导致转换器失败,因此系统会阻止转换的进行。

is_feature_type_convertible(feature_type: str, data_type: str = '') -> bool

参数

feature_type
必需

要设置的特征类型。

data_type
必需

从 infer_dtype() 推断的数据类型。

data_type

返回

如果列可以根据推断的数据类型转换为新的特征类型,则布尔值为 True。

safe_convert_on_data_type

为数据类型提供可能的安全类型列转换选项。

safe_convert_on_data_type(feature_type: str, data_type: str = '') -> Optional[str]

参数

feature_type
必需

当前列的特征类型。

data_type
必需

从 infer_dtype() 推断的数据类型。

data_type

返回

兼容且可安全使用的可能的列用途。

safe_convert_on_feature_type

为特征类型提供可能的安全类型列转换选项。

safe_convert_on_feature_type(feature_type: str) -> Optional[str]

参数

feature_type
必需

当前列的特征类型。

feature_type
必需

返回

兼容且可安全使用的可能的列用途。