Main Content

series

Connect components in series to create pipeline

Since R2026a

    Description

    pipeline = series(pipe1,...,pipeN) creates a pipeline (pipeline) by connecting the components or pipelines pipe1 through pipeN in an ordered series. Use series to model sequential, order-dependent processes or workflows.

    series connects the outputs of pipe1 to the inputs of pipe2 by matching port tags. If no matches are found, no connections are made. pipe1 and pipe2 then form a pipeline and the process repeats. That is, the function sequentially appends the remaining pipe3 through pipeN components or pipelines to the pipeline. This process might leave some ports unconnected. These unconnected ports become inputs and outputs of the pipeline.

    pipe1 through pipeN must have unique names. series renames any component that has the same name as another component already in the pipeline. New names consist of the original name with a numeric suffix.

    example

    pipeline = series(pipe1,...,pipeN,ExpandSubpipelines=expandflag) creates a pipeline where the pipeline elements of pipe1,...,pipeN are either expanded or collapsed, based on the value of expandflag.

    Examples

    collapse all

    Create a pipeline by connecting two components in series.

    removeMissing = observationRemoverComponent;
    normalizer = normalizerComponent;
    pipeline = series(removeMissing,normalizer)
    pipeline = 
    
      LearningPipeline with properties:
    
                 Name: "defaultName"
               Inputs: ["DataIn1"    "DataIn2"]
            InputTags: [1 2]
              Outputs: ["DataScaled"    "DataOut2"]
           OutputTags: [1 2]
    
           Components: struct with 2 entries
          Connections: [5×2 table]
    
        HasLearnables: true
           HasLearned: false
    
    
    Show summary of the components

    Input Arguments

    collapse all

    Element to connect to another element in series, specified as a LearningPipeline object or a learning component object in one of the following tables.

    Data Preprocessing Components

    ComponentPurpose
    equalWidthBinnerComponentGrouping data into equal-width bins
    frequencyEncoderComponentFrequency encoding categorical variables
    kmeansEncoderComponentFeature extraction using k-means clustering
    normalizerComponentNormalizing data
    observationImputerComponentImputing missing values
    observationRemoverComponentRemoving observations
    oneHotEncoderComponentEncoding categorical data into one-hot vectors
    outlierImputerComponentImputing outlier values
    outlierRemoverComponentRemoving outlier values
    pcaComponentPrincipal component analysis (PCA)
    quantileBinnerComponentBinning data into equally probable bins
    ricaComponentFeature extraction using reconstruction independent component analysis (RICA)
    sparseFilterComponentFeature extraction using sparse filtering

    Feature Selection and Engineering Components

    ComponentPurpose
    featureSelectionClassificationANOVAComponentFeature selection using one-way ANOVA test
    featureSelectionClassificationChi2ComponentFeature selection using chi-square tests
    featureSelectionClassificationKruskalWallisComponentFeature selection using Kruskal-Wallis test
    featureSelectionClassificationMRMRComponentMinimum redundancy maximum relevance (MRMR) feature selection in classification workflow
    featureSelectionClassificationNCAComponentNeighborhood component analysis (NCA) feature selection in classification workflow
    featureSelectionClassificationReliefFComponentReliefF feature selection in classification workflow
    featureSelectionRegressionFTestComponentFeature selection using F-tests
    featureSelectionRegressionMRMRComponentMinimum redundancy maximum relevance (MRMR) feature selection in regression workflow
    featureSelectionRegressionNCAComponentNeighborhood component analysis (NCA) feature selection in regression workflow
    featureSelectionRegressionReliefFComponentReliefF feature selection in regression workflow
    variableSelectorComponentManual variable selection

    Classification Model Components

    ComponentPurpose
    classificationDiscriminantComponentDiscriminant analysis classification
    classificationECOCComponentMulticlass classification using error-correcting output codes (ECOC) model
    classificationEnsembleComponentEnsemble classification
    classificationGAMComponentBinary classification using generalized additive model (GAM)
    classificationKernelComponentClassification using Gaussian kernel with random feature expansion
    classificationKNNComponentClassification using k-nearest neighbor model
    classificationLinearComponentBinary classification of high-dimensional data using a linear model
    classificationNaiveBayesComponentMulticlass classification using a naive Bayes model
    classificationNeuralNetworkComponentClassification using a neural network model
    classificationSVMComponentOne-class and binary classification using a support vector machine (SVM) classifier
    classificationTreeComponentDecision tree classifier

    Regression Model Components

    ComponentPurpose
    regressionEnsembleComponentEnsemble regression
    regressionGAMComponentRegression using generalized additive model (GAM)
    regressionGPComponentGaussian process regression
    regressionKernelComponentKernel regression using explicit feature expansion
    regressionLinearComponentLinear regression
    regressionNeuralNetworkComponentNeural network regression
    regressionSVMComponentRegression using a support vector machine (SVM)
    regressionTreeComponentDecision tree regression

    Custom Components

    ComponentPurpose
    functionComponentCustom function

    Flag for expanding the subpipelines of pipeline, specified as true (1) or false (0). A value of true expands all the pipeline elements of pipe1,...,pipeN in pipeline. A value of false collapses all the pipeline elements of pipe1,...,pipeN.

    You can choose to expand subpipelines after creating a pipeline by using the expand function.

    Data Types: logical

    Output Arguments

    collapse all

    New pipeline created from components or pipelines, returned as a LearningPipeline object.

    Version History

    Introduced in R2026a