FeatureDistance

FeatureDistance[example1,example2,extractor]

gives the distance between example1 and example2 in the feature space defined by extractor.

FeatureDistance[extractor]

represents an operator form of FeatureDistance that can be applied to a pair of examples.

Details and Options

Examples

open allclose all

Basic Examples  (1)

Construct a dataset of dog images:

Train an extractor function from this dataset:

Compute the distance in the feature space between two images using FeatureDistance:

Generate an operator form of FeatureDistance:

This operator form can be used to compute distances:

Compute the distance matrix of the dataset using this feature distance:

Find the dog that maximizes its distance from the others in the feature space:

Options  (1)

DistanceFunction  (1)

Train a feature extractor to compute term frequency-inverse document frequency vectors from texts:

Construct a feature distance for this feature extractor:

The distance function EuclideanDistance has been chosen. Use the option DistanceFunction to chose CosineDistance instead:

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

Text

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

BibTeX

@misc{reference.wolfram_2020_featuredistance, author="Wolfram Research", title="{FeatureDistance}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/FeatureDistance.html}", note=[Accessed: 11-May-2021 ]}

BibLaTeX

@online{reference.wolfram_2020_featuredistance, organization={Wolfram Research}, title={FeatureDistance}, year={2016}, url={https://reference.wolfram.com/language/ref/FeatureDistance.html}, note=[Accessed: 11-May-2021 ]}

CMS

Wolfram Language. 2016. "FeatureDistance." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FeatureDistance.html.

APA

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