Skip to content

detector

detector ¤

LambdaDetector — the runtime object produced by register_lambda_rule.

A LambdaDetector is the lambda-rule counterpart of the 290 built-in detector classes under ts_shape.events.*. It does not subclass any of them — instead it implements the same conceptual contract:

  1. evaluate(df) returns a legacy-shaped DataFrame.
  2. to_event_log(df, ...) runs the evaluator and hands the result to the canonical :func:~ts_shape.eventlog.to_event_log dispatcher.

Because the spec is registered in :data:ts_shape.eventlog.taxonomy.REGISTRY at registration time, to_event_log finds it without any new code path.

LambdaDetector ¤

LambdaDetector(spec: RuleSpec)

Runnable form of a :class:RuleSpec.

evaluate ¤

evaluate(df: DataFrame) -> pd.DataFrame

Apply the rule to df and return a legacy-shaped DataFrame.