prune
Description
creates a reduced version of the pipeline newPipeline = prune(pipeline,outputs)pipeline by retaining only
the components, inputs, and dependencies required to produce the specified outputs in
outputs.
The function traces all dependencies needed to compute the requested outputs and removes
any components or inputs that are not required. prune also considers
the current state of each component. For example, if the learn object
function has been applied to a component, the pipeline excludes any inputs used only for
learning from the list of dependencies to retain. However, prune
includes any dependencies necessary for components that have not completed the learn phase.
That is, regardless of the specified outputs, the pipeline retains all components and inputs
required for learning.
Examples
Input Arguments
Output Arguments
Tips
Use
pruneto create a lean inference pipeline after all components have been learned. The pruned pipeline removes parts of the pipeline that are no longer needed for prediction or deployment.
Version History
Introduced in R2026a
See Also
LearningPipeline | learn | run