WOLFRAM

Copy to clipboard.
DeleteAnomalies[{example1,example2,}]

gives a list in which examplei that are considered anomalous have been dropped.

Copy to clipboard.
DeleteAnomalies[fun,data]

drops anomalies in data using the given AnomalyDetectorFunction[] or LearnedDistribution[].

Details and Options

Examples

open allclose all

Basic Examples  (3)Summary of the most common use cases

Drop anomalous examples in a numeric dataset:

Out[6]=6

Delete anomalous examples in a nominal dataset:

Out[1]=1

Delete anomalies from a list of colors:

Out[1]=1

Scope  (3)Survey of the scope of standard use cases

Train an AnomalyDetectorFunction on a two-dimensional array of pseudorandom real numbers:

Out[1]=1

Use the trained AnomalyDetectorFunction with DeleteAnomalies to drop anomalous examples:

Out[3]=3

Delete anomalies from a Tabular object:

Out[1]=1

Obtain a random sample of training and test datasets of images:

Out[1]=1

Add anomalous examples to corrupt the datasets:

Out[2]=2

Train a distribution on images:

Out[3]=3

Use the trained distribution to drop anomalous examples in the test set:

Out[4]=4

Options  (2)Common values & functionality for each option

AcceptanceThreshold  (1)

Specify the AcceptanceThreshold for dropping anomalies from a list of colors:

Out[1]=1

Method  (1)

Create a dataset sampled from two different distributions:

Out[1]=1

Delete anomalies in the dataset using the "Multinormal" method:

Out[2]=2

Delete anomalies in the dataset using the "KernelDensityEstimation" method:

Out[3]=3

Applications  (4)Sample problems that can be solved with this function

Find the statistical mean of numeric values with an anomaly:

Out[1]=1

Delete anomalies before computing the mean:

Out[2]=2

Plot a list of numeric values that contains anomalies:

Out[1]=1

Plot a list of numeric values after removing anomalies:

Out[2]=2

Find the linear fit for numerical data:

Out[2]=2

Delete outliers before modeling the fit:

Out[3]=3

Obtain a dataset of images:

Out[2]=2

Train an anomaly detector on the training set:

Out[3]=3

Drop anomalous examples in the test set:

Out[4]=4
Wolfram Research (2019), DeleteAnomalies, Wolfram Language function, https://reference.wolfram.com/language/ref/DeleteAnomalies.html (updated 2025).
Copy to clipboard.
Wolfram Research (2019), DeleteAnomalies, Wolfram Language function, https://reference.wolfram.com/language/ref/DeleteAnomalies.html (updated 2025).

Text

Wolfram Research (2019), DeleteAnomalies, Wolfram Language function, https://reference.wolfram.com/language/ref/DeleteAnomalies.html (updated 2025).

Copy to clipboard.
Wolfram Research (2019), DeleteAnomalies, Wolfram Language function, https://reference.wolfram.com/language/ref/DeleteAnomalies.html (updated 2025).

CMS

Wolfram Language. 2019. "DeleteAnomalies." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/DeleteAnomalies.html.

Copy to clipboard.
Wolfram Language. 2019. "DeleteAnomalies." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/DeleteAnomalies.html.

APA

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

Copy to clipboard.
Wolfram Language. (2019). DeleteAnomalies. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DeleteAnomalies.html

BibTeX

@misc{reference.wolfram_2025_deleteanomalies, author="Wolfram Research", title="{DeleteAnomalies}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/DeleteAnomalies.html}", note=[Accessed: 26-March-2025 ]}

Copy to clipboard.
@misc{reference.wolfram_2025_deleteanomalies, author="Wolfram Research", title="{DeleteAnomalies}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/DeleteAnomalies.html}", note=[Accessed: 26-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_deleteanomalies, organization={Wolfram Research}, title={DeleteAnomalies}, year={2025}, url={https://reference.wolfram.com/language/ref/DeleteAnomalies.html}, note=[Accessed: 26-March-2025 ]}

Copy to clipboard.
@online{reference.wolfram_2025_deleteanomalies, organization={Wolfram Research}, title={DeleteAnomalies}, year={2025}, url={https://reference.wolfram.com/language/ref/DeleteAnomalies.html}, note=[Accessed: 26-March-2025 ]}