# what does the notation $g\colon X\to Y$ mean?

What does the notation $g\colon X \to Y$ mean in this Wikipedia page, under the section "Problem statement (supervised version)"?

-

It means that $g$ is a function which takes elements from $X$ as inputs and returns elements in $Y$ as outputs.

-
is this always the case? also, is there a specific mathematics i should study to learn about related notation? – Charles Lambert May 1 '11 at 6:54
As far as I've seen this is always the meaning of $g: X\rightarrow Y$, but I can't say for certain that it's never used differently. – Alex Becker May 1 '11 at 6:55
Well, sometimes this notation is used to describe a morphism in a category. And morphisms needs not to be functions (e.g. in the category $\mbox{Set}^{op}$ a morphism $g: X \to Y$ is a function $Y \to X$). Anyway this is not the case here. – Giacomo d'Antonio May 1 '11 at 8:20

It describes a function; a mapping from one set (X) to another (Y). For a more details see Set-builder notation

-

The $g$ function there is the mapping between instances to output labels. In other words, it is the correct association of events and their respective patterns. Presumably, the goal of supervised pattern recognition is to assign patterns to events in a way that best mirrors the truth (i.e. the $g$ function).

-