Main Content

setScalarizationMethods

Set scalarization methods for domain-specific signal features

Since R2024a

    Description

    setScalarizationMethods(sFE,featurename) sets the ScalarizationMethod property of the signalTimeFrequencyFeatureExtractor object sFE by specifying an empty list of scalarization methods for the signal feature featurename.

    setScalarizationMethods(sFE,featurename,params) sets scalarization methods params for the signal feature featurename in the ScalarizationMethod property of the signalTimeFrequencyFeatureExtractor object sFE.

    example

    Examples

    collapse all

    Extract the spectral kurtosis and spectral crest from the Fourier synchrosqueezed transform of a sinusoidal signal. Set scalarization methods to extract the impulse factor and peak value for the spectral kurtosis feature.

    Create a time-frequency feature extractor object that returns the spectral kurtosis and spectral crest features from the Fourier synchrosqueezed transform of a sinusoidal signal.

    x = sin(2*pi*(0:0.1:1));
    tfFE = signalTimeFrequencyFeatureExtractor( ...
        Transform="synchrosqueezedspectrogram", ...
        SpectralKurtosis=true,SpectralCrest=true);

    Specify the scalarization methods to the time-frequency feature extractor object to extract the impulse factor and peak value for the spectral kurtosis feature. This operation sets up the ScalarizationMethod property in tfFE.

    setScalarizationMethods(tfFE,"SpectralKurtosis",...
                                ImpulseFactor=true,PeakValue=true)
    disp(tfFE.ScalarizationMethod)
      timeFrequencyScalarFeatureOptions with properties:
    
              SpectralKurtosis: [2×1 string]
              SpectralSkewness: [0×0 string]
                 SpectralCrest: [0×0 string]
              SpectralFlatness: [0×0 string]
               SpectralEntropy: [0×0 string]
                      TFRidges: [0×0 string]
        InstantaneousBandwidth: [0×0 string]
        InstantaneousFrequency: [0×0 string]
           InstantaneousEnergy: [0×0 string]
            MeanEnvelopeEnergy: [0×0 string]
                  TimeSpectrum: [0×0 string]
                WaveletEntropy: [0×0 string]
                 ScaleSpectrum: [0×0 string]
                           All: [0×0 string]
    

    Extract the vector and scalar features from the Fourier synchrosqueezed transform of x. Display the indices corresponding to the extracted features from the returned feature matrix. The feature extraction returns the spectral kurtosis vector followed by the impulse factor and the peak value scalar features, and then appends the spectral crest vector.

      [features,info] = extract(tfFE,x);
      info
    info = struct with fields:
                     SpectralKurtosis: [1 2 3 4 5 6 7 8 9 10 11]
        SpectralKurtosisImpulseFactor: 12
            SpectralKurtosisPeakValue: 13
                        SpectralCrest: [14 15 16 17 18 19 20 21 22 23 24]
    
    

    Input Arguments

    collapse all

    Feature extractor object, specified as a signalTimeFrequencyFeatureExtractor object.

    Name of the signal feature, specified as a string scalar or a character vector.

    Data Types: char | string

    Scalarization methods associated with featurename, specified as name-value arguments or a structure array. You can specify multiple name-value arguments.

    • Specify params as name-value arguments, where:

      • Name — Name of the scalarization method. Specify Name as ClearanceFactor, Mean, CrestFactor, PeakValue, ImpulseFactor, Energy, StandardDeviation, Kurtosis, Skewness, or Entropy. For more information, see Scalarization Methods for Domain-Specific Signal Features.

      • Value — Logical value of the scalarization method. Specify Value as either true or false.

    • Specify params as a struct array, where the field name is the name of the scalarization method and the value is either true or false.

    Note

    The scalarization method Entropy is not supported if you specify featurename as either WaveletEntropy or SpectralEntropy.

    Example: setScalarizationMethods(sFE,"SpectralCrest",PeakValue=true,Mean=true) and setScalarizationMethods(sFE,"SpectralCrest",struct("PeakValue",true,"Mean",true)) set the peak value and the mean as scalarization methods for the spectral crest feature in the signalTimeFrequencyFeatureExtractor object sFE using name-value arguments and structure arrays, respectively.

    More About

    collapse all

    Tips

    • Use the getScalarizationMethods function to return the list of scalarization methods for the features that you enabled when creating the feature extractor object.

    Version History

    Introduced in R2024a