Projecting Data Onto One Direction
A projection onto a unit direction can turn a vector into one coordinate measured along that direction.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 4
- Reading time
- 1 min
In this article4 chapters
Trace a coordinate
For vector \((3,4)\) and direction \((1,0)\), the dot product is three. Reconstructing the projected point gives \((3,0)\). Dot products supply the coordinate.
Choose the direction from the task
A different direction retains another kind of variation. When learning the direction from centered data, principal components maximize a defined variance criterion.[1]
Compute the signed coordinate and the projected vector
For vector \((3,4)\) and unit direction \((1,0)\), their dot product is three and the projected vector is \((3,0)\). The discarded component is \((0,4)\), orthogonal to the direction. See dot products and angles.
Projection coefficient 3
Projected point (3,0)
Residual (0,4)
Residual dot direction equals zero
Normalize the direction or account for its norm
If direction is \((2,0)\), the scalar coefficient relative to that vector is \(6/4=1.5\), which still gives the projection \((3,0)\). Check that multiplying the direction by a positive scalar does not change the projected point.