maths is really and truly a way of life and thinking, and i’ve diverged from the way. doing an intro to ml course is slightly bringing me back, but maths from a cs perspective is funny. it’s cute
If you have a graph of points in a space, and you’re trying to find a plane of best fit, you might try just slicing up the plane at random angles and picking the one which is least wrong.
This is a random linear classifier.


- graph of points? – points in real life are characteristics that have a relationship that we can record as numbers. height, weight, eye colour can all be encoded and tracked against each other. A space is just a visual record of these things. It’s hard to picture for more than 3d because human brains aren’t that bright.
- plane of best fit? – once you have this space, you might want to use a simple, flat, easy-to-define mechanism for predicting things within that plane. there are many ways you can think of best fit, but another way of saying it is reducing the overall error of all predictions in that plan to what they would “actually” be in real life. we want this error to be really small to be doing a good job.

- slicing up the plane at random angles? a slice can be defined like below. think of it like primary school y=mx+b but writtena bit different, and for bigger and badder dimensions. so the line where θᵀ + θ₀ = 0 is our plane of interset. (new Claude usage unlocked: ask it to give you the greek symbols for almost inchorent easy-keyboard-access letters).

- then, we can just pick random pairs of (θᵀ, θ₀) and see what happens.
- see what happens? least wrong? – least wrong is just the minimum (argmin) error produced by a given plane

- how do you measure how far a point p actually is from a point x on a plane? – the formula below is the perp distance from a vector H to point G.

- In the formula for the plane , θ is the normal vector, so it becomes. (p-x)θ / norm(θ) (sorry for lazy typing!). This simplifies to

Knowing “how far” is important because you often don’t want to treat all offs as equally bad.
Leave a comment