Contenuto principale

view

View diagram of pipeline inputs, outputs, components, and connections

Since R2026a

    Description

    view(pipe) displays the pipeline or component pipe in a new window. Obround shapes indicate pipeline inputs and outputs, rounded rectangles indicate components, and arrows indicate component connections. Data passes through the pipeline from top to bottom. The software adds color to connections made automatically by matching the Tag properties of component ports.

    example

    Examples

    collapse all

    Create a simple pipeline with two serial components. View the pipeline.

    pca = pcaComponent(NumComponents=3);
    ecoc = classificationECOCComponent;
    pipeline = series(pca,ecoc);
    view(pipeline)

    View of simple pipeline with two components

    The pipeline has two components with learnable parameters, neither of which has been learned yet. This pipeline has no components without learnable parameters. The display also shows the inputs and outputs of the pipeline and the internal data ports, such as DataOut from the PCA component.

    Load sample data and define the predictor and response variables.

    fisheriris = readtable("fisheriris.csv");
    X = fisheriris(:,1:end-1);
    Y = fisheriris(:,end);

    Learn the pipeline by passing data through it. View the learned pipeline.

    [learnedPipeline,predY,scores,loss] = learn(pipeline,X,Y);
    view(learnedPipeline)

    View of simple pipeline with two components after learning

    Note that the parameters in the two components have been learned. To see the learned parameters, index into the components, for example, learnedPipeline.Components.PCA.

    For a more in-depth example that uses pipeline visualizations, see Create Simple Classification Pipeline.

    Input Arguments

    collapse all

    Pipeline or component to view, 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

    Version History

    Introduced in R2026a