Lines and Hyperplanes
A line in two dimensions can be written as:
Here, is a point, is a normal vector, and is an offset.
The normal vector points across the line, not along it.
Boundary Scores
The expression:
is a signed score.
- positive value: one side
- negative value: the other side
- zero: on the boundary
This is why a linear classifier can classify points by a sign.
Let w = [1, -1], b = 0, and x = [3, 3].
Compute w . x + b.
Compute it first, then check your number.
HintDot product first
Compute the dot product first.
SolutionBoundary score
Compute the signed score:
A score of zero means the point lies on the boundary.
Normal Direction
The vector is perpendicular to the boundary.
That means it points in the direction of fastest score change. Moving along the boundary keeps the score at zero. Moving in the normal direction changes the score.
This is often the most useful way to read a linear model. The vector does not merely store coefficients. It names the direction in input space that increases the score most directly. The boundary is perpendicular to that direction.
Enter 1 if the normal vector points across the boundary, or 2 if it points
along the boundary.
Compute it first, then check your number.
HintNormal means perpendicular
A normal vector is perpendicular to the line or hyperplane.
SolutionAcross the boundary
Enter 1. The normal vector points across the boundary, not along it. It
points in the direction where the score changes most directly.
Enter 1 if moving in the normal direction changes the boundary score, while
moving along the boundary keeps the score constant.
Compute it first, then check your number.
HintAcross versus along
Along the boundary, remains zero.
SolutionNormal changes the score
Enter 1. A boundary is a set of equal score. The normal direction points
across that set, where the score changes.
Hyperplanes
In two dimensions, a hyperplane is a line.
In three dimensions, a hyperplane is a plane.
In dimensions, a hyperplane has dimension .
We use the same equation:
Let w = [1, -1], b = 0, and x = [4, 2].
What is w . x + b?
Compute it first, then check your number.
HintSigned score
Positive and negative values indicate opposite sides.
SolutionPositive side
The score is positive, so the point is on the positive side of the boundary.
Before Moving On
Hyperplanes are geometric boundaries written as dot products.