FittedPipeline

FittedPipeline()

Methods

Name Description
from_expr Recover the outermost FittedPipeline from a tagged expression.
from_tag_node Recover a FittedPipeline from a specific pipeline tag node.
reemit Re-emit tag_node’s subtree under current code.
score Compute model score on test data.
score_expr Compute metrics using deferred execution.

from_expr

from_expr(expr)

Recover the outermost FittedPipeline from a tagged expression.

from_tag_node

from_tag_node(tag_node)

Recover a FittedPipeline from a specific pipeline tag node.

Reads features/target from ALL_STEPS metadata on the tag and finds the training source by graph structure (innermost step tag’s parent).

reemit

reemit(tag_node, rebuild_subexpr)

Re-emit tag_node’s subtree under current code.

Refits the pipeline on the rebuilt training subtree so the outer tag’s training_hash and step kwargs refresh, rebuilds catalog subtrees inside the tag’s parent (so inner Reads resolve to the target catalog’s files), and re-stamps the outer pipeline tag on the rebuilt parent with fresh kwargs from the refitted pipeline.

The internal transform/predict expression structure is preserved; we do not re-invoke the response method, since the original predict/transform input is not recoverable from the tag subtree alone.

score

score(X, y, scorer=None, **kwargs)

Compute model score on test data.

Parameters

Name Type Description Default
X array - like Test features required
y array - like Test targets required
scorer str or callable Scorer name from sklearn.metrics.get_scorer_names() or a callable metric function. If None, uses model’s default (accuracy for classifiers, r2 for regressors) None
**kwargs dict Additional arguments passed to the scorer function {}

Returns

Name Type Description
float The computed score

score_expr

score_expr(expr, scorer=None, **kwargs)

Compute metrics using deferred execution.

Parameters

Name Type Description Default
expr ibis.Expr Expression containing test data required
scorer str, callable, _BaseScorer, Scorer, or None Scorer specification. If None, uses model’s default. Automatically detects whether scorer needs predict, predict_proba, or decision_function. None
**kwargs dict Additional arguments passed to the metric function {}

Returns

Name Type Description
ibis.Expr Deferred metric expression