# Distribution counting notation understanding problem

It's hard to ask good question about it but I have problem with understanding notation which is as follows:

$$p(y\mid x, κ) = \frac 1 κ \sum_{i∈N κ(x, D)}\mathbb{I}(y_i = y)$$

The aim of this equation is to model probability distribution $y$ for given $x$, with given $k$? where $k$ is number of nearest neighbours. If u could help understanding what exactly that sum notation is ;/ Do I need to sum multiplications of identity matrix's multiplicated by some $y$?
Sry for my poor knowledge.
• Did you encounter this notation in some book or other written source? If so, please give more details (what is $\kappa,D,N_\kappa,\mathbb{I}$, what are neighbors?). – Michał Miśkiewicz Apr 3 '17 at 19:50
• Presumably $\mathbb{I}$ is the indicator function, i.e., $\mathbb{I}(y_i=y)$ is $1$ if $y_i=y$ and $0$ if $y_i\neq y$. Without seeing it used in it's full context I can't be sure, but I'm fairly confident that is the case given how you've described it. – David Apr 3 '17 at 21:06