# p-vector and K-vector

I'm reading "The Elements of Statistical Learning" and early on there are references to p-vectors (page 10) and K-vectors (page 12).

What exactly is meant by a p-vector and K-vector?

It's merely some generic notation for a vector of $p$ attributes or variables observed on $i=1,\dots, N$ individuals, so that you can define $X^T = (X_1,X_2,\dots,X_p)$ as a vector of inputs, in the feature (or input) space (and each individual will have one such vector of observed inputs).

The $K$ notation seems to be reserved to the output space: in a classical linear regression model where $Y=X\beta$, Y is a scalar ($K=1$), whereas in a multivariate setting (say, you record weight, height, and color) it could be a $K$-vector (i.e., 3-vector with my example).

• No I could not understand it. I want to understand it in terms of samples and features. Samples is the number of inputs and each sample can have a different number of features. So which is p and which is N in this case? If N is the number of inputs and P is the number of components then why on page 11 P is given as the number of inputs just before (2.1) X transform = (X1, X2 .... Xp) ?? Oct 13 '15 at 16:45
• @Anton Samples = N and features = p, following my notation.
– chl
Oct 13 '15 at 22:15

In mathematics and physics, the "x" in "x-vector" stands for the dimension of the vector. The meanings of $K$ and $p$ were previously established. Typically a "p-vector" is written as a column vector and a "p-covector" would be written as a row vector.

So there is a confusion if one is coming from the domain of machine learning.

In the beginning of the book it said that: features = inputs = a set of variables (X1,.... Xp). "inputs" is not related to the number of input samples. Input samples (training samples) are called "observations" (1 .. i .. N).

• xi - the ith observation as a column vector of X1,X2 ... Xp
• X is N x p matrix where each row is an observation and contains one input vector, so each row is xti
• xti = (X1,X2 .... j ... Xp)