whylogs.core.metrics.unicode_range#

Module Contents#

Classes#

UnicodeRangeMetric

For string values, maintains a DistributionMetric for the counts of

class whylogs.core.metrics.unicode_range.UnicodeRangeMetric(submetrics: Dict[str, Dict[str, whylogs.core.metrics.Metric]])#

Bases: whylogs.core.metrics.multimetric.MultiMetric

For string values, maintains a DistributionMetric for the counts of characters that fall within user-defined codepoint ranges.

Parameters
range_definitionsDict[str, Tuple[int, int]]

Defines the character ranges to be counted. The key servers as the range name and should only contain alphanumeric, hyphen, and underscore characters. The tuple defines the Unicode codepoint range to be tracked. The string length is tracked under the key “STRING_LENGTH” so don’t use that as a range name.

Parameters

submetrics (Dict[str, Dict[str, whylogs.core.metrics.Metric]]) –

property namespace: str#
Return type

str

range_definitions: Dict[str, Tuple[int, int]]#
lower_case: bool = True#
normalize: bool = True#
submetrics: Dict[str, Dict[str, whylogs.core.metrics.Metric]]#
merge(other: UnicodeRangeMetric) UnicodeRangeMetric#
Parameters

other (UnicodeRangeMetric) –

Return type

UnicodeRangeMetric

columnar_update(view: whylogs.core.preprocessing.PreprocessedColumn) whylogs.core.metrics.metrics.OperationResult#
Parameters

view (whylogs.core.preprocessing.PreprocessedColumn) –

Return type

whylogs.core.metrics.metrics.OperationResult

classmethod zero(config: Optional[whylogs.core.metrics.metrics.MetricConfig] = None) UnicodeRangeMetric#
Parameters

config (Optional[whylogs.core.metrics.metrics.MetricConfig]) –

Return type

UnicodeRangeMetric

classmethod from_protobuf(msg: whylogs.core.proto.MetricMessage) UnicodeRangeMetric#
Parameters

msg (whylogs.core.proto.MetricMessage) –

Return type

UnicodeRangeMetric

merge_submetrics(other: MULTI_METRIC) Dict[str, Dict[str, whylogs.core.metrics.Metric]]#
Parameters

other (MULTI_METRIC) –

Return type

Dict[str, Dict[str, whylogs.core.metrics.Metric]]

to_protobuf() whylogs.core.proto.MetricMessage#
Return type

whylogs.core.proto.MetricMessage

get_component_paths() List[str]#
Return type

List[str]

to_summary_dict(cfg: Optional[whylogs.core.configs.SummaryConfig] = None) Dict[str, Any]#
Parameters

cfg (Optional[whylogs.core.configs.SummaryConfig]) –

Return type

Dict[str, Any]

classmethod submetrics_from_protobuf(msg: whylogs.core.proto.MetricMessage) Dict[str, Dict[str, whylogs.core.metrics.Metric]]#
Parameters

msg (whylogs.core.proto.MetricMessage) –

Return type

Dict[str, Dict[str, whylogs.core.metrics.Metric]]