FeatureExtractor

FeatureExtractor

is an option for functions such as Classify that specifies how features should be extracted.

Details

  • Possible settings for FeatureExtractor include:
  • FeatureExtractorFunction[]apply the given extractor function
    extractorapply the specified feature extractor method
    {extractor1,extractor2,}apply the sequence of extractor methods in turn
    specextapply extractor ext to data parts specified by spec
    {spec1ext1,spec2ext2,}apply extractors exti to data parts specified by the speci
  • Possible feature extractor methods include:
  • Automaticautomatic extraction
    Identitygive data unchanged
    "ConformedData"conformed images, colors, dates, etc.
    "NumericVector"numeric vector from any data
    fapplies function f to each example
    {extractor1,extractor2,}use a sequence of extractors in turn
  • Additional feature extractor methods can also be used for each data type.
  • Numeric data:
  • "DiscretizedVector"discretized numerical data
    "DimensionReducedVector"reduced-dimension numeric vectors
    "MissingImputed"data with missing values imputed
    "StandardizedVector"numeric data processed with Standardize
  • Nominal data:
  • "IndicatorVector"nominal data "one-hot encoded" with indicator vectors
    "IntegerVector"nominal data encoded with integers
  • Text:
  • "LowerCasedText"text with each character lowercase
    "SegmentedCharacters"text segmented into characters
    "SegmentedWords"text segmented into words
    "TFIDF"term frequency-inverse document frequency vector
    "WordVectors"semantic vectors sequence from a text (English only)
  • Images:
  • "FaceFeatures"semantic vector from an image of a human face
    "ImageFeatures"semantic vector from an image
    "PixelVector"vector of pixel values from an image
  • Audio objects:
  • "AudioFeatures"sequence of semantic vectors from an audio object
    "AudioFeatureVector"semantic vector from an audio object
    "LPC"audio linear prediction coefficients
    "MelSpectrogram"audio spectrogram with logarithmic frequency bins
    "MFCC"audio mel-frequency cepstral coefficient vectors sequence
    "SpeakerFeatures"sequence of semantic speaker vectors
    "SpeakerFeatureVector"semantic vector for a speaker
    "Spectrogram"audio spectrogram
  • Video objects:
  • "VideoFeatures"sequence of semantic vectors from a video object
    "VideoFeatureVector"semantic vector from a video object
  • Graphs:
  • "GraphFeatures"numeric vector summarizing graph properties
  • Molecules:
  • "AtomPairs"Boolean vector from pairs of atoms and the path lengths between them
    "MoleculeExtendedConnectivity"Boolean vector from enumerated molecule subgraphs
    "MoleculeFeatures"numeric vector summarizing molecule properties
    "MoleculeTopologicalFeatures"Boolean vector from circular atom neighborhoods
  • By default, FeatureExtractorIdentity.
  • Typically, the value of FeatureExtractor is interpreted as a preprocessing step: it will not replace the other feature extractors used by the function.
  • When the feature extractor method is not a FeatureExtractorFunction[] or a custom function, the feature extraction will be learned from the data.
  • With the settings specext or {spec1ext1,}, possible forms for spec and the speci include:
  • Allall parts of each example
    ii^(th) part of each example
    {i1,i2,}parts i1, i2, of each example
    "name"part with the specified name in each example
    {"name1","name2",}parts with names "namei" in each example
  • Parts not mentioned in spec or the speci are dropped for the purpose of extracting features.
  • In functions such as Classify, Predict, DimensionReduction or ClusterClassify, FeatureExtractor"Minimal" indicates that the internal preprocessing should be as simple as possible.

Examples

open allclose all

Basic Examples  (3)

Train a FeatureExtractorFunction on a simple dataset:

Use the feature extractor function as a preprocessing step in Classify:

Train a classifier using the extractor method "ImageFeatures" as a preprocessing step:

Classify a new image:

Generate a predictor function using FeatureExtractor to preprocess the data using a custom function:

Add the "StandardizedVector" method to the preprocessing pipeline:

Use the predictor on new data:

Scope  (1)

Train a classifier on texts preprocessed by custom functions and an extractor method:

Wolfram Research (2016), FeatureExtractor, Wolfram Language function, https://reference.wolfram.com/language/ref/FeatureExtractor.html (updated 2021).

Text

Wolfram Research (2016), FeatureExtractor, Wolfram Language function, https://reference.wolfram.com/language/ref/FeatureExtractor.html (updated 2021).

CMS

Wolfram Language. 2016. "FeatureExtractor." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/FeatureExtractor.html.

APA

Wolfram Language. (2016). FeatureExtractor. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FeatureExtractor.html

BibTeX

@misc{reference.wolfram_2023_featureextractor, author="Wolfram Research", title="{FeatureExtractor}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/FeatureExtractor.html}", note=[Accessed: 19-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_featureextractor, organization={Wolfram Research}, title={FeatureExtractor}, year={2021}, url={https://reference.wolfram.com/language/ref/FeatureExtractor.html}, note=[Accessed: 19-March-2024 ]}