1

I am trying to read a book on machine learning which define the error function $hS(x)$ where $$[m] = \{1,\ldots,m\}$$ as being

equation

However I do not understand well basics math notation, would you mind helping me to understand this one, and also if you have some documents available in order to learn the language.

Thanks!

Trevor Gunn
  • 27,041
matel
  • 13

2 Answers2

1

This is saying in English: "if there exist an $i$ in the set $[m]$ such that $x_i = x$, then $hS(x) = y_i$. Otherwise, $hS(x) = 0$."

AsafHaas
  • 769
1

Here's how I would have written it:

We define the function $hS$ by mapping $x_i \mapsto y_i$ (read "mapping $x_i$ to $y_i$") for $i \in [m]$ and all other inputs to $0$.

What this means is, $hS$ takes a value $x$ as input. If that value $x$ happens to be equal to $x_1$ then $hS(x) = hS(x_1) = y_1$; if that value happens to be equal to $x_2$ then $hS(x) = hS(x_2) = y_2$; and in general, if $x = x_i$ then $hS(x_i) = y_i$. Finally, if $x$ is not equal to $x_1$ nor $x_2$ nor $x_3$, . . ., nor $x_m$ then $hS(x) = 0$.

Trevor Gunn
  • 27,041