is an option for SynthesizeMissingValues and ToTabular to specify which data elements are considered missing.
MissingValuePattern
is an option for SynthesizeMissingValues and ToTabular to specify which data elements are considered missing.
Details
- MissingValuePattern is typically used to identify missing values. For instance, it is common to have some proxy value be interpreted as missing.
- Possible settings include:
-
Automatic automatically determine missing values patt use patt for each element to determine missing values - The patti can also be Automatic, in which case, missing for that column is automatically recognized.
- By default, Missing[…] and Indeterminate values are considered missing.
Examples
open all close allBasic Examples (2)
Specify that missing values are indicated by the value "99":
data = {{1, 1.2}, {2, 2}, {3, 99}, {99, 1}, {2, 6}};SynthesizeMissingValues[data, MissingValuePattern -> 99]Specify that the missing values are integers:
data = {{1.1, 3, "A"}, {2, 4.2, "A"}, {3.2, 3, "B"}, {4.4, 5, "B"}, {5.2, 6.0, "A"}, {7, 7.3, "B"}, {9.1, 10.2, "B"}};SynthesizeMissingValues[data, MissingValuePattern -> _Integer]ToTabular[data, MissingValuePattern -> _Integer]Scope (3)
Specify missing values with Condition:
data = {{1.1, 3}, {2, 4.2}, {3, 4}, {4.4, 5}, {5, 6}, {7, 8.3}, {9, 10}};SynthesizeMissingValues[data, MissingValuePattern -> x_ /; x < 3]ToTabular[data, MissingValuePattern -> x_ /; x < 3]Train a distribution on a two-dimensional dataset:
ld = LearnDistribution[{{1.1, 1.4}, {2.3, 3.1}, {4.4, 5.4}, {8.7, 7.5}}]Specify that missing values are indicated by the value "7":
SynthesizeMissingValues[ld, {{4.2, 5.2}, {5.8, 7}}, MissingValuePattern -> 7]By default, Tabular only interprets explicit Missing[…] expressions as missing values:
Tabular[{{1, Yesterday}, {3, today}, {Missing[], Tomorrow}}]Use ToTabular to specify a pattern for the entries that should be additionally interpreted as missing values:
ToTabular[{{1, Yesterday}, {3, today}, {Missing[], Tomorrow}}, MissingValuePattern -> _Symbol]Specify multiple MissingValuePattern values:
Tabular[{{1, Yesterday}, {3, today}, {Infinity, Tomorrow}}]ToTabular[{{1, Yesterday}, {3, today}, {Infinity, Tomorrow}}, MissingValuePattern -> (Infinity | _Symbol)]Applications (1)
data = RandomSample[ResourceData["MNIST", "TrainingData"][[All, 1]], 10000];RandomSample[data, 10]Train a distribution on the images:
ld = LearnDistribution[ImageData /@ data]Use MissingValuePattern to replace the pixel values that should be considered missing with the samples generated from the learned distribution:
synthdata = SynthesizeMissingValues[ld, ImageData /@ {[image], [image]}, MissingValuePattern -> 0.5, Method -> "ModeFinding"];Image /@ synthdataRelated Guides
Text
Wolfram Research (2019), MissingValuePattern, Wolfram Language function, https://reference.wolfram.com/language/ref/MissingValuePattern.html (updated 2025).
CMS
Wolfram Language. 2019. "MissingValuePattern." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/MissingValuePattern.html.
APA
Wolfram Language. (2019). MissingValuePattern. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MissingValuePattern.html
BibTeX
@misc{reference.wolfram_2026_missingvaluepattern, author="Wolfram Research", title="{MissingValuePattern}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/MissingValuePattern.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_missingvaluepattern, organization={Wolfram Research}, title={MissingValuePattern}, year={2025}, url={https://reference.wolfram.com/language/ref/MissingValuePattern.html}, note=[Accessed: 12-June-2026]}