주요 콘텐츠

prodserver.pipeline.Client

MATLAB client for machine learning pipelines deployed to MATLAB Production Server

Since R2026a

    Description

    prodserver.pipeline.Client creates a client object that encapsulates the connection between MATLAB® and a LearningPipeline (Statistics and Machine Learning Toolbox) object deployed to a MATLAB Production Server™ instance. Once the connection is created, you can use the learn (Statistics and Machine Learning Toolbox) and run (Statistics and Machine Learning Toolbox) object functions to interact with the deployed LearningPipeline object and modify the states of its components, or use indexing to read its properties.

    Creation

    Description

    client = prodserverPipelineClient(archive,host,port) creates a client connection between the pipeline client and the specified archive, which is an archive already deployed to MATLAB Production Server, using the specified host and port for the MATLAB Production Server instance.

    example

    client = prodserverPipelineClient(archive,host,port,Folder=path) specifies the folder in which to generate the client.

    Input Arguments

    expand all

    Archive deployed to MATLAB Production Server, specified as a string scalar or character vector that indicates the base filename of the deployed archive, without a path or file extension. This argument sets the archive property of the client object.

    Data Types: string scalar | character vector

    Host name or address of your MATLAB Production Server instance, specified as a string scalar or character vector containing the IPv4 or IPv6 address or as "localhost".

    Data Types: string | char

    Port number on which the MATLAB Production Server instance is running, specified as an integer between 1 and 65535. This argument sets the port property of the client object.

    Data Types: int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

    Folder in which to generate the client, specified as a string scalar or character vector containing the full file path for the folder. This folder must be empty, because the software deletes it when the class is no longer in use.

    Data Types: string | char

    Output Arguments

    expand all

    Object encapsulating the connection between the client and the MATLAB Production Server instance on which the pipeline is hosted, specified as a Client object.

    Properties

    expand all

    This property is read-only.

    Components in the machine learning pipeline, returned as an array of components.

    This property is read-only.

    Names of the components in the pipeline, returned as a cell array.

    This property is read-only.

    Pipeline deployed to the server, returned as a LearningPipeline (Statistics and Machine Learning Toolbox) object.

    This property is read-only.

    Name of the pipeline contained in the archive, returned as a string scalar.

    This property is read-only.

    Host on which MATLAB Production Server is running, returned as a string scalar containing the IPv4 or IPv6 address or as "localhost".

    This property is read-only.

    Port number on which MATLAB Production Server is running, returned as an integer between 1 and 65535.

    This property is read-only.

    Name of the archive that contains the pipeline, returned as a string scalar.

    Object Functions

    learn (Statistics and Machine Learning Toolbox)Initialize and evaluate pipeline or component
    run (Statistics and Machine Learning Toolbox)Execute pipeline or component for inference after learning

    Examples

    collapse all

    Create a machine learning pipeline client named carOrigin, running on localhost:9910.

    client = prodserverPipelineClient("carOrigin","localhost",9910);

    Create a machine learning pipeline client named carOrigin, running on localhost:9910. Use the folder input argument to specify the location in which to generate the client.

    client = prodserverPipelineClient("carOrigin","localhost",9910,Folder="C:\Users\Public\Documents\Pipelines");

    Create a machine learning pipeline client named carOrigin, running on localhost:9910. Then, access data from the deployed pipeline.

    client = prodserverPipelineClient("carOrigin","localhost",9910)

    Access data from the client by indexing into its properties. For example, display the names of each component in the pipeline using the ComponentNames property.

    client.ComponentNames
      ans =
        ["RemoveObservations", "NumericSelector", "PCATransformer", "CategoricalSelector", "SVM"]

    You can also display the value of a specific property in the deployed pipeline.

    client.Components.SVM.TrainedModel
      ans = 
      CompactClassificationSVM
               PredictorNames: {'Model_Year'  'PCA1'}
                 ResponseName: 'Y'
        CategoricalPredictors: []
                   ClassNames: [NotUSA    USA]
               ScoreTransform: 'none'
                        Alpha: [195×1 double]
                         Bias: 0.1839
             KernelParameters: [1×1 struct]
               SupportVectors: [195×2 double]
          SupportVectorLabels: [195×1 double]

    To display the entire LearningPipeline object, use the Pipeline property.

    client.Pipeline
      ans = 
      LearningPipeline with properties:
    
                 Name: "CarOrigin"
               Inputs: ["DataIn1"    "DataIn2"]
            InputTags: [1 2]
              Outputs: ["Predictions"    "Scores"    "Loss"    "DataOut2"]
           OutputTags: [1 0 0 2]
    
           Components: struct with 5 entries
          Connections: [12×2 table]
    
        HasLearnables: true
           HasLearned: true

    More About

    expand all

    Version History

    Introduced in R2026a

    See Also

    (Statistics and Machine Learning Toolbox) | (Statistics and Machine Learning Toolbox)