And now for an explanation of how some classification algorithms work and an honest question (thread)
For classifying data like was used in the Netflix prize you have a big problem: There are lots of people and lots of movies, and the number of overlapping movie ratings different people gave is very small
In data science parlance the data is sparse and high dimensional. This makes it not very useful for guessing if a particular person would like a particular movie.
A trick for getting this under control is to map people and movies onto points on a square. You can find good positions iteratively: For each person who didn't like a movie, nudge their points farther apart, for ones who liked it, move them together.
Repeat this process until things stabilize. This reduces the high dimensional data down to two dimensions and allows you to apply a normal distance function to guess whether a person will like a movie. It's a good idea, but can be improved on.
Consider what happens if what you really have is three clusters plus noise. If you put them in a square then there are a few possible configurations they could wind up in: two in adjacent corners and one in the middle of the opposite edge, or \
put into three separate corners. In the first case one pair of groups will seem closer than the others, in the second one will seem farther than the others. There will always be an odd one out and which direction it is and even which it is will \
be entirely an arbitrary accident of your starting position. Obviously this isn't ideal: if there are three equidistant groups, it should say they're equidistant.
The obvious problem is the corners. They're different from the rest of the space and make it non-homogeneous. If you make the space toroidal (wrapping around the sides) the situation is probably improved.
What exactly happens with three on toroidal is an interesting question, but it's possible to do better so let's skip to the improvement
The better approach is to map to points on the surface of a sphere with the distance between two points counted as the angle lines from them to the center make.
The math for this is simple and elegant and has to do with the cosine of the angle between two unit vectors being their dot product. You can search for those terms for details, for now you can trust me that it's elegant
If you apply the test of the true grouping being three clusters this is now much improved: They'll get equally spaced about an equatorial line and be equidistant from each other. Four will go to corners of a tetrahedron and again work well
Six is more awkward though: They'll go to the centers of the faces of a cube and each group will seem to be closer to four of the others than the fifth, which is maximally distant from
Now for my honest question: Why not use a projective plane? For those who don't know, which is probably almost everyone reading this, a projective plane can be implemented by glueing opposite points on a sphere to each other
So the angle between two points is either x or 180-x, whichever is smaller. This space has some funky properties: If you were to be in it and go in a straight line until you returned to where you started your handedness relative to the rest of the world would
be the opposite of what you started with. But we're just talking about points here which don't have handedness so it doesn't matter.
Our equidistant cases now seem much better. Three groups go to orthogonal face centers of a cube and not only are they equidistant but adding the third group doesn't force the other two to move around.
Six groups is much improved. They'll go to the corners of an icosahedron and be equidistant.
Five groups is a bit awkward in all cases and I'm not sure exactly what it does but if you go to a 4-projective plane instead of a 2-projective plane they all wind up exactly orthogonal. It doesn't seem to work that well no matter how many dimensions of regular sphere you use
As you go up in number of dimensions the complexity of geometry it can handle goes up rapidly but you'll always get funny artifacts when the number of them is greater than the kissing number of that number of dimensions
Of course going up in number of dimensions also tends to make everything look equidistant from everything else and make the classifier's predictions not very useful in practice.
If anybody knows whether the projective plane approach is already widely used, known to have issues, or a promising idea I'd like to hear about it!
Somehow Twitter munged the threading of this and it's a bit of a tree rather than a list. Oops. Deleting the out of order tweets and moving them to the end now
Four groups go to the four corners of a cube and are all equidistant. Like with the face centers they come in opposite pairs so on a projective plane the number of them is halved: three faces instead of six, four corners instead of eight

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Bram Cohen

Bram Cohen Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @bramcohen

16 Jul
Trying to figure out what happened in the Avenatti case it's completely bananas and I have questions (thread)
The story is that Avenatti approached Nike threatening a lawsuit over them having violated NCAA rules that college athletes must be treated like slaves, and offered a settlement including him personally getting paid $20 million (or so) to \
run an internal investigation at Nike making sure that they continued to treat college athletes like slaves moving forwards. Clearly he personally really, really cares strongly that college athletes continue to be treated like slaves.
Read 13 tweets
15 Jul
Writing computer programs to play snake is very interesting! Here's an overview, which I have many thoughts on including a straightforwardly implementable clear improvement (thread)
A much algorithm thing which works by dividing the board into 2x2 cells which makes calculation easier for reasons is here github.com/twanvl/snake/
The inefficiencies added by the limitation to cells are extremely small and not really worth discussing, there are vastly larger optimizations to be had for much less effort and risk.
Read 13 tweets
13 Jun
Apparently there's some kind of panic about Chia going on in China. It isn't even clear what claims are being made, but here are some points to reiterate (thread)
The network doesn't just trust how much space your local machine claims it has. It's trivial to fool your local farmer into thinking it has lots of space. That doesn't mean it will fool the network.
The new faster plotter isn't a threat to the network's security, it just makes plotting faster and more convenient, which is a good thing. The network is secured by space, not plotting speed
Read 7 tweets
11 Jun
People are asking/speculating about the new Chia plotter. It's better but the details are complicated (thread)
What it does is make better use of available cores for multithreading. This results in a big headline speedup on SSD in terms of the minimum number of seconds to finish a whole plot
But it isn't nearly as big an improvement to overall rate of plotting if you compare to running multiple plots on multiple drives at once. It also probably makes almost no difference writing to HD because that was nearly I/O bound already
Read 14 tweets
3 Jun
There's a subtle point about pool/farmer 'difficulty' which I misunderstood the question on in the video this morning so I'll try to explain now (thread)
On the actual running network there's what's called 'work difficulty' which determines a quality threshold above which a proof of space successfully qualifies for making a block
There's a subtlety here about timelords and the rate they're running at which don't matter for this explanation. But know there are timelords and they do important stuff which you rarely have to worry about
Read 13 tweets
27 May
And now I present what passes for intellectual commentary about coin issuance (thread) medium.com/@nic__carter/i…
The message is 'Premines are unethical. I have this great idea that you can give yourself a leg up on mining by keeping the PoW algorithm secret beforehand and making your own ASICs in advance'
Because laundering the money at great expense totally changes everything. This being twitter I should clarify that that was sarcasm. It just wastes a bunch of money and makes a burning need to dump to recoup some of that investment
Read 14 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(