Metric 类

表示数据偏移分析中返回的指标。

Metric 类仅适用于内部使用。 使用 DataDriftDetector 对象的 get_output 方法返回指标。

指标构造函数。

继承
builtins.object
Metric

构造函数

Metric(name, value, extended_properties, schema_version='1.0')

参数

名称 说明
name
必需
str

指标的名称。

value
必需

指标的值。

extended_properties
必需

包含从字符串到 Python 基元类型(int、float、str)的字典。

schema_version
str

可选的指标架构版本。 如未设置特定值,则设置为 METRIC_SCHEMA_VERSION_CUR。

默认值: 1.0
name
必需
str

指标的名称。

value
必需

指标的值。

extended_properties
必需

包含从字符串到 Python 基元类型(int、float、str)的字典。

schema_version
必需
str

可选的指标架构版本。 如未设置特定值,则设置为 METRIC_SCHEMA_VERSION_CUR。

方法

add_extended_properties
get_extended_properties
validate_extended_properties_type

add_extended_properties

add_extended_properties(ep)

参数

名称 说明
ep
必需

get_extended_properties

get_extended_properties()

validate_extended_properties_type

validate_extended_properties_type(key, value)

参数

名称 说明
key
必需
value
必需