# PRML: Why the elements of y(x) sums to 1? (Chapter 4.1.3)

I could not understand the reason why PRML (Pattern Recognition and Machine Learning by Christopher Michael Bishop) says:

An interesting property of least-squares solutions with multiple target variables is that if every target vector in the training set satisfies some linear constraint $$a^\top t_n+b=0 \tag{4.18}$$ for some constants a and b, then the model prediction for any value of x will satisfy the same constraint so that $$a^\top y(x)+b=0. \tag{4.19}$$ Thus if we use a 1-of-K coding scheme for K classes, then the predictions made by the model will have the property that the elements of y(x) will sum to 1 for any value of x.

Why?
If the element of $y(x)$ sum to 1, it should be that $\mathbb{a} = \mathbb{1}$ and $b=-1$.

• although PRML book is famous, it is still nice to use the full name and provide the Amazon book link for more people to understand your question. Sep 27, 2017 at 15:29
• Some additional context for the formula would be helpful... What does it describe? What does the book say about it?
– Tim
Sep 27, 2017 at 15:34
• @Tim thank you. I put the quote from the book, with some context. Sep 27, 2017 at 15:40
• Are you asking what a 1-of-K coding scheme is? Or are you asking about vector notation?
– whuber
Sep 27, 2017 at 18:18
• @whuber thank you. Now I could understand. Because $t_n$ is one-hot, it holds $a^\top t_n + b = 0$ --> every element of $a$ is $-b$. Then $a^\top y(x) + b = -b(1^\top y(x) - 1) = 0$, means the sum of elements of $y(x)$ is 1. (trivial solution $b = 0$ was ignored) Sep 28, 2017 at 14:10