represents a feature extractor function generated by FeatureExtraction.
FeatureExtractorFunction
represents a feature extractor function generated by FeatureExtraction.
Details and Options
- FeatureExtractorFunction works like Function.
- FeatureExtractorFunction[…][data] extracts features from data.
- FeatureExtractorFunction[…][{data1,data2,…}] extracts features from each of the datai.
- FeatureExtractorFunction[…][data,prop] gives the specified property of the feature extraction associated with data.
- Possible properties include:
-
"ExtractedFeatures" features extracted from data (default) "OriginalData" deduce original data from extracted features "ReconstructedData" extraction and inverse extraction of data - The following options can be given:
-
PerformanceGoal Automatic aspects of performance to try to optimize RandomSeeding 1234 what seeding of pseudorandom generators should be done internally - Possible settings for RandomSeeding include:
-
Automatic automatically reseed every time the function is called Inherited use externally seeded random numbers seed use an explicit integer or strings as a seed
Examples
open all close allBasic Examples (1)
Train a FeatureExtractorFunction on a simple dataset:
fe = FeatureExtraction[{{1.4, "A"}, {1.5, "A"}, {2.3, "B"}, {5.4, "B"}}]Extract features from a new example:
fe[{2.4, "A"}]Extract features from a list of examples:
fe[{{2.4, "A"}, {3.7, "B"}}]Scope (5)
Some feature extractors can only perform an approximation of the inverse extraction:
fe = FeatureExtraction[{{1.4, 1.4, 5.4, 5.2}, {1.5, 1.5, 6.4, 5.2}, {1.2, 1.2, 6.2, 5.2}, {1.6, 1.6, 4.3, 5.2}}, "DimensionReducedVector"]features = fe[{1.1, 1.2, 5.1, 5.7}]fe[features, "OriginalData"]The FeatureExtraction property "ReconstructedData" can be used to obtain the data after extraction and reconstruction:
FeatureExtraction[{{1.4, 1.4, 5.4, 5.2}, {1.5, 1.5, 6.4, 5.2}, {1.2, 1.2, 6.2, 5.2}, {1.6, 1.6, 4.3, 5.2}}, "DimensionReducedVector", "ReconstructedData"]Some feature extractors cannot be inverted:
FeatureExtraction[{[image], [image] , [image], [image]}, "ImageFeatures", "ReconstructedData"]Train a feature extractor from a dataset that contains missing values:
fe = FeatureExtraction[{{1.4, Missing[], "A"}, {1.5, 50.2, "A"}, {Missing[], 42.3, "B"}, {5.4, 61.7, "B"}}]The feature extractor now indicates that missing values are imputed. The feature extractor can extract features even when values are missing:
fe[{3.4, Missing[], "B"}]Get Information from a trained FeatureExtractorFunction:
Information[FeatureExtractorFunction[Association["ExampleNumber" -> 4,
"Preprocessor" -> MachineLearning`MLProcessor["ToMLDataset",
Association["Input" -> Association["age" -> Association["Type" -> "Numerical"],
"gender" -> Association["Type" - ... ate" -> DateObject[{2025, 5, 2, 13, 0,
39.042795`8.344115878952366}, "Instant", "Gregorian", 2.], "ProcessorCount" -> 10,
"ProcessorType" -> "ARM64", "OperatingSystem" -> "MacOSX", "SystemWordLength" -> 64,
"Evaluations" -> {}]]]]Find the available properties:
Information[FeatureExtractorFunction[Association["ExampleNumber" -> 4,
"Preprocessor" -> MachineLearning`MLProcessor["ToMLDataset",
Association["Input" -> Association["age" -> Association["Type" -> "Numerical"],
"gender" -> Association["Type" - ... ate" -> DateObject[{2025, 5, 2, 13, 0,
39.042795`8.344115878952366}, "Instant", "Gregorian", 2.], "ProcessorCount" -> 10,
"ProcessorType" -> "ARM64", "OperatingSystem" -> "MacOSX", "SystemWordLength" -> 64,
"Evaluations" -> {}]]], "Properties"]Get information about the feature names and training examples:
Information[FeatureExtractorFunction[Association["ExampleNumber" -> 4,
"Preprocessor" -> MachineLearning`MLProcessor["ToMLDataset",
Association["Input" -> Association["age" -> Association["Type" -> "Numerical"],
"gender" -> Association["Type" - ... ate" -> DateObject[{2025, 5, 2, 13, 0,
39.042795`8.344115878952366}, "Instant", "Gregorian", 2.], "ProcessorCount" -> 10,
"ProcessorType" -> "ARM64", "OperatingSystem" -> "MacOSX", "SystemWordLength" -> 64,
"Evaluations" -> {}]]], {"FeatureNames", "ExampleNumber"}]Possible Issues (1)
Retrieve a old FeatureExtractorFunction using keyed features:
fe = FeatureExtractorFunction[Association["ExampleNumber" -> 0,
"Preprocessor" -> MachineLearning`MLProcessor["ToMLDataset",
Association["Input" -> Association["input" -> Association["Type" -> "Text"]],
"Output" -> Association["f1" -> Asso ... "Date" -> DateObject[{2026, 1, 28, 15, 36, 22.701151`8.10862286062899}, "Instant", "Gregorian",
0.], "ProcessorCount" -> 10, "ProcessorType" -> "ARM64", "OperatingSystem" -> "MacOSX",
"SystemWordLength" -> 64, "Evaluations" -> {}]]];Using absent or incorrect feature names will give errors or missing content:
fe["Hello"]fe[<|"Input" -> "Hello"|>]Retrieve the feature names using Information:
Information[fe, "FeatureNames"]fe[<|"input" -> "Hello"|>]Related Guides
Text
Wolfram Research (2016), FeatureExtractorFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/FeatureExtractorFunction.html (updated 2017).
CMS
Wolfram Language. 2016. "FeatureExtractorFunction." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/FeatureExtractorFunction.html.
APA
Wolfram Language. (2016). FeatureExtractorFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FeatureExtractorFunction.html
BibTeX
@misc{reference.wolfram_2026_featureextractorfunction, author="Wolfram Research", title="{FeatureExtractorFunction}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/FeatureExtractorFunction.html}", note=[Accessed: 15-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_featureextractorfunction, organization={Wolfram Research}, title={FeatureExtractorFunction}, year={2017}, url={https://reference.wolfram.com/language/ref/FeatureExtractorFunction.html}, note=[Accessed: 15-June-2026]}