LearningPipeline
Description
A LearningPipeline object is a container that holds and connects
multiple steps (components) of a machine learning workflow as a direct
acyclic graph (DAG). The pipeline components can contain data-dependent parameters, such as
learnables. You can train a pipeline with training data and then use the trained pipeline for
inference by passing new data through it. Create a pipeline by connecting one or more
components or pipelines in series or in parallel.
Creation
You can create a pipeline using automatic or manual connections.
Automatic connections
Create and change a pipeline automatically by using the
seriesandparallelobject functions. You can also use these functions to combine pipelines and components. For example, after creating three componentsc1,c2, andc3, you can specifyp1 = series(c1,c2); p2 = series(p1,c3).The
insertobject function places components in a pipeline by automatically cutting and reconnecting the existing connections. Thereplaceobject function automatically makes the correct connections when the new and replaced components are compatible.Automatic creation functions automatically solve naming issues (such as having multiple components or pipeline ports with the same name) and connect the components.
For more details on automatic connections, see Port Tags for Automatic Connection.
Manual connections
p = LearningPipelinecreates a pipeline without processing components or connections. You can build upon the pipeline by using theadd,remove,connect, anddisconnectobject functions.The
addandremovefunctions do not connect the newly added components or remaining components in the pipeline. After usingaddorremove, you must use theconnectfunction to define connections.
Properties
Object Functions
Examples
Algorithms
Version History
Introduced in R2026a
