WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

Nominal [{cat1,cat2,,catn}]

represents the unordered set of categories cati.

Nominal [{cat1,cat2,,catn},ci]

represents the category ci of the given categories.

Nominal [scale]

represents a set of categories with metainformation given by scale.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Applications  
Properties & Relations  
See Also
History
Cite this Page

Nominal [{cat1,cat2,,catn}]

represents the unordered set of categories cati.

Nominal [{cat1,cat2,,catn},ci]

represents the category ci of the given categories.

Nominal [scale]

represents a set of categories with metainformation given by scale.

Details

  • A nominal scale represents a set of categories, with no inherent ordering. Typical examples include types of products, names and places.
  • There is no ordering between the categories; they are either equal or not.
  • The categories cati can be any expression.
  • In Nominal [scale], scale can be a list of categories, a NominalScale specification, a Nominal expression or an Association of category information.
  • Nominal [scale][c] is equivalent to Nominal [scale,c].

Examples

open all close all

Basic Examples  (3)

Represent a possible set of a, b, c:

Wolfram Language code: Nominal[{a, b, c}]

Represent the category a from within the set:

Wolfram Language code: Nominal[{a, b, c}, a]

Create a list of categories from a category scale:

Wolfram Language code: scale = Nominal[{"round", "square", "irregular"}]
Wolfram Language code: scale /@ {"square", "square", "round", "irregular"}

Use categories with labels:

Wolfram Language code: scale = Nominal[<|"CategoryList" -> {"h", "t"}, "LabelList" -> {"Heads", "Tails"}|>]
Wolfram Language code: scale /@ {"t", "t", "h", "t", "h", "h", "h"}

Scope  (4)

A NominalScale expression may be used as a scale specification:

Wolfram Language code: scale = Nominal[NominalScale[{"foo", "bar"}]]
Wolfram Language code: scale["bar"]

A Nominal expression may be used as a scale specification:

Wolfram Language code: scale = Nominal[{"red", "green", "blue"}]
Wolfram Language code: Nominal[scale, "blue"]

Information will provide detailed information about a given Nominal expression:

Wolfram Language code: Information[Nominal[{"x", "y", "z"}]]

Information will also give details about a specific Nominal category:

Wolfram Language code: Information[Nominal[{"x", "y", "z"}, "y"]]

TabularColumn will automatically detect Nominal category expressions:

Wolfram Language code: TabularColumn[{Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 1], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 1], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 2], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 3], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 1], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 2], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 1], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 1], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 3], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 1]}]

Normal will restore the original Nominal expressions:

Wolfram Language code: Normal@%

Applications  (2)

Visualize a collection of categories with CategoricalHistogram :

Wolfram Language code: CategoricalHistogram[{Nominal[Association["CategoryList" -> {"psychology", "rhetoric", "sociology"}, "LabelList" -> {"psychology", "rhetoric", "sociology"}, "ScoreList" -> {1, 2, 3}], 3], Nominal[Association["CategoryList" -> {"psychology", "rhetoric", "sociology"}, "LabelList" -> {"psychology", "rhetoric", "sociology"}, "ScoreList" -> {1, 2, 3}], 2], Nominal[Association["CategoryList" -> {"psychology", "rhetoric", "sociology"}, "LabelList" -> {"psychology", "rhetoric", "sociology"}, "ScoreList" -> {1, 2, 3}], 3], Nominal[Association["CategoryList" -> {"psychology", "rhetoric", "sociology"}, "LabelList" -> {"psychology", "rhetoric", "sociology"}, "ScoreList" -> {1, 2, 3}], 1], Nominal[Association["CategoryList" -> {"psychology", "rhetoric", "sociology"}, "LabelList" -> {"psychology", "rhetoric", "sociology"}, "ScoreList" -> {1, 2, 3}], 2], Nominal[Association["CategoryList" -> {"psychology", "rhetoric", "sociology"}, "LabelList" -> {"psychology", "rhetoric", "sociology"}, "ScoreList" -> {1, 2, 3}], 3], Nominal[Association["CategoryList" -> {"psychology", "rhetoric", "sociology"}, "LabelList" -> {"psychology", "rhetoric", "sociology"}, "ScoreList" -> {1, 2, 3}], 1], Nominal[Association["CategoryList" -> {"psychology", "rhetoric", "sociology"}, "LabelList" -> {"psychology", "rhetoric", "sociology"}, "ScoreList" -> {1, 2, 3}], 1], Nominal[Association["CategoryList" -> {"psychology", "rhetoric", "sociology"}, "LabelList" -> {"psychology", "rhetoric", "sociology"}, "ScoreList" -> {1, 2, 3}], 3], Nominal[Association["CategoryList" -> {"psychology", "rhetoric", "sociology"}, "LabelList" -> {"psychology", "rhetoric", "sociology"}, "ScoreList" -> {1, 2, 3}], 1]}]

Get the probability of a given category within a CategoricalDistribution :

Wolfram Language code: dist = CategoricalDistribution[Nominal[{"Windows", "Linux", "macOS", "Android", "iOS"}], {8, 3, 5, 2, 3}]
Wolfram Language code: Probability[x == Nominal[Association["CategoryList" -> {"Android", "iOS", "Linux", "macOS", "Windows"}, "LabelList" -> {"Android", "iOS", "Linux", "macOS", "Windows"}, "ScoreList" -> {1, 2, 3, 4, 5}], 4], xdist]

Properties & Relations  (3)

Ordinal expressions operate similarly to Nominal ones, with the exception of sorting:

Wolfram Language code: cats = {"b", "c", "a"};
Wolfram Language code: nom = Nominal[cats]
Wolfram Language code: ord = Ordinal[cats]

Since there is no inherent order to Nominal categories, they follow canonical order(e.g. alphabetical):

Wolfram Language code: Sort[nom /@ cats]

As such, there is no minimum category:

Wolfram Language code: Min[nom /@ cats]

Ordinal categories are sorted by their ordering within the scale:

Wolfram Language code: Sort[ord /@ cats]

This also applies to comparisons as well:

Wolfram Language code: Min[ord /@ cats]

CategoricalValue can be used to extract the underlying expression for a category:

Wolfram Language code: CategoricalValue[Nominal[Association["CategoryList" -> {"a", "b", "c"}, "LabelList" -> {"a", "b", "c"}, "ScoreList" -> {1, 2, 3}], 1]]

The same is true for an entire scale:

Wolfram Language code: CategoricalValue[Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}]]]

TabularColumn will automatically detect Nominal expressions:

Wolfram Language code: nom = {Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 1], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 1], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 2], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 3], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 1], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 2], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 1], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 1], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 3], Nominal[Association["CategoryList" -> {"accrue", "choosy", "spuriously"}, "LabelList" -> {"accrue", "choosy", "spuriously"}, "ScoreList" -> {1, 2, 3}], 1]};
Wolfram Language code: TabularColumn[nom]

The "ElementType" for columns of Nominal object is "Nominal":

Wolfram Language code: %["ElementType"]
Wolfram Research (2026), Nominal, Wolfram Language function, https://reference.wolfram.com/language/ref/Nominal.html.

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2026_nominal, author="Wolfram Research", title="{Nominal}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/Nominal.html}", note=[Accessed: 19-August-2026]}

BibLaTeX

@online{reference.wolfram_2026_nominal, organization={Wolfram Research}, title={Nominal}, year={2026}, url={https://reference.wolfram.com/language/ref/Nominal.html}, note=[Accessed: 19-August-2026]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /