主要内容

deep.transform.logit

Logit transform

Since R2026a

    Description

    Y = deep.transform.logit(X) applies the logit transform to the input X. When you convert a Statistics and Machine Learning Toolbox™ neural network model that uses a logit score transform to a dlnetwork object, the last layer of the network is a function layer that applies the deep.transform.logit function.

    example

    Examples

    collapse all

    Apply the logit transform to random data.

    X = rand(3,5);
    X = dlarray(X,"CB");
    Y = deep.transform.logit(X)
    Y = 
      3(C) × 5(B) dlarray
    
        0.6931    0.7137    0.5692    0.7241    0.7226
        0.7121    0.6530    0.6334    0.5393    0.6190
        0.5317    0.5244    0.7226    0.7252    0.6900
    
    

    Create a function layer that applies the logit transform.

    layer = functionLayer(@deep.transform.logit)
    layer = 
      FunctionLayer with properties:
    
                 Name: ''
           PredictFcn: @deep.transform.logit
          Formattable: 0
        Acceleratable: 0
    
       Learnable Parameters
        No properties.
    
       State Parameters
        No properties.
    
      Show all properties
    
    

    Input Arguments

    collapse all

    Input data, specified as a dlarray object. X must have at most two dimensions.

    Output Arguments

    collapse all

    Transformed data, returned as a dlarray object that is the same size as X.

    Algorithms

    collapse all

    Version History

    Introduced in R2026a