MCPcopy Create free account
hub / github.com/IBM/AssetOpsBench / _threshold_condition_function

Function _threshold_condition_function

src/servers/tsfm/dataquality.py:16–27  ·  view source on GitHub ↗
(threshold, condition_type="<")

Source from the content-addressed store, hash-verified

14
15
16def _threshold_condition_function(threshold, condition_type="<"):
17 conditions = {
18 "<": lambda x: x < threshold,
19 "<=": lambda x: x <= threshold,
20 ">": lambda x: x > threshold,
21 ">=": lambda x: x >= threshold,
22 "==": lambda x: x == threshold,
23 }
24 assert condition_type in conditions, (
25 f"condition_type {condition_type!r} is not supported"
26 )
27 return conditions[condition_type]
28
29
30# ── NaN statistics ────────────────────────────────────────────────────────────

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected