extracts features for each of the examplei using a feature extractor trained on all the examplei.


extracts features using the specified feature extractor method.


extracts features by applying the extractori in sequence.


uses the extractor methods specified by ext on parts of examples specified by spec.


uses the extractor methods exti on parts of examples specified by the speci.

Details and Options

  • FeatureExtract can be used on many types of data, including numerical, textual, sounds and images, and combinations of these.
  • Each examplei can be a single data element, a list of data elements, an association of data elements, or a Dataset object.
  • Possible feature extractor methods to use in FeatureExtract include:
  • Automaticautomatic extraction
    "ConformedData"conformed images, colors, dates, etc.
    "DiscretizedVector"discretized numerical data
    "DimensionReducedVector"reduced-dimension numeric vectors
    "FaceFeatures"semantic vector from an image of a human face
    "ImageFeatures"semantic vector from an image
    "IndicatorVector"nominal data "one-hot encoded" with indicator vectors
    "IntegerVector"nominal data encoded with integers
    "LowerCasedText"text with each character lower cased
    "MissingImputed"data with missing values imputed
    "NumericVector"numeric vector from any data
    "PixelVector"vector of pixel values from an image
    "StandardizedVector"numeric data processed with Standardize
    "SegmentedCharacters"text segmented into characters
    "SegmentedWords"text segmented into words
    "TFIDF"term frequency-inverse document frequency vector
    Identitygive data unchanged
    fapplies function f to each example
    {extractor1,extractor2,}use a sequence of extractors in turn
  • Feature extractor methods are applied to data elements with whose types they are compatible. Other data elements are returned unchanged.
  • FeatureExtract[examples] is typically equivalent to FeatureExtract[examples,"NumericVector"].
  • In FeatureExtract[examples,specext] or FeatureExtract[examples,{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 FeatureExtract[examples,{spec1ext1,}], the exti are all applied separately to examples.
  • The following options can be given:
  • FeatureNamesAutomaticnames to assign to elements of the examplei
    FeatureTypesAutomaticfeature types to assume for elements of the examplei
  • FeatureExtract[] is equivalent to FeatureExtraction[,"ExtractedFeatures"].


open allclose all

Basic Examples  (4)

Extract features from a simple dataset:

Click for copyable input

Extract feature from images:

Click for copyable input

Standardized numerical values using the "StandardizedVector" extractor method:

Click for copyable input

Extract TFIDF vectors on characters by chaining the extractor methods "SegmentedCharacters" and "TFIDF":

Click for copyable input

Scope  (8)

Options  (2)

Applications  (1)

See Also

FeatureExtraction  FeatureExtractor  DimensionReduce  FeatureSpacePlot

Introduced in 2016