Skip to content

get_rules

Scope: read · Signature: get_rules(experiment_id: str, kind: {model|business|qa} = model, engine: str | None = None, class_key: str | None = None) -> Any

Use for IF-THEN rule cards of a supervised experiment, with Train and Test numbers.

kind="model" (default): label rules found through the model's trees. kind="business": the independent, directly-applyable rule model (gated by get_capabilities.has_business_rules; evaluation = the rules' own held-out performance). kind="qa": the rules' overlap (coverage Jaccard). Flat numbers are Train (rows the rules were found on — optimistic); metrics_holdout is Test (held-out rows); trust holds_up ∈ {holds_up, does_not_hold_up, too_few_rows}. engine ∈ {positive_miner, sequential, all_class}; class_key picks a multiclass one-vs-rest class (every kind); class_status gives, per class × engine, the rules mined, an engine's failure, or budget_stop (best rules found so far). A long set reaches you as its first rules (rules_total = how many). Every rule: the __rules SQL table; per-row "which rules fired": the __rules_fired table. Guidance: get_playbook("explainability"). On 404, check supported/computed engines and explanation readiness before computing.

Powered by: mli rule extraction (mli/docs/guides/rules.md).