Pipeline#
- class Pipeline(steps, breakpointers, pruners=None, once_in_iterations=1)[исходный код]#
Базовые классы:
BaseEstimatorIterative mixture model parameter estimator.
Sequentially executes configured processing steps, applies pruners, and checks stopping criteria on each iteration until convergence.
Steps and breakpointers may keep state between iterations. They are reused by every call of
fit(), which callsPipelineStep.reset()andBreakpointer.reset()on each of them before the first iteration, so no per-fit state carries over between fits. Pruners are reused as is.historyis not cleared between calls, so records of repeated fits accumulate.Steps and pruners must replace
state.curr_mixturewith a new mixture object instead of modifying it in place, becauseprev_mixtureand the history records hold references to it.- Параметры:
steps (Sequence[PipelineStep]) – Ordered sequence of steps executed in each iteration.
breakpointers (Sequence[Breakpointer]) – Stopping criteria defining termination conditions. Must not be empty.
pruners (Sequence[Pruner] | None, optional) – Component pruning strategies applied after step execution. Defaults to None.
once_in_iterations (int, optional) – Iteration snapshot recording frequency in history. Defaults to 1.
- Переменные:
steps (list[PipelineStep]) – Ordered list of iteration steps.
breakpointers (list[Breakpointer]) – Configured stopping criteria.
pruners (list[Pruner]) – Configured component pruners.
history (IterationsHistory) – Recorded iteration snapshots.
- Исключение:
ValueError – If
stepsis empty or cannot form a closed loop (each step, including the last transitioning to the first, must permit the next inavailable_next_steps), or ifbreakpointersis empty.
Methods
fit(X, mixture)Fit mixture model parameters using the iterative pipeline.