I often huff and puff at articles like TFA, but here I found myself nodding: the method is sound and makes sense.
Some comments I must leave though:
Clustering is not the point of black and white keys. Rather it is the facility to pick an anatomically reachable, desired subset of 12 keys available per octave. As a simplified European tradition baseline, that is the white keys transposed by some number of semitones. The salient thing here is to have a row of keys which are mostly two semitones apart but have a one semitone gap at strategic locations to produce the scale.
Much of the music in the world operates roughly on the pentatonic scale which coincides with the black keys, or the complement of "European" scales in a 12 step equally tempered octave. Pentatonic scales are mostly two semitone steps with strategic 3 semitone steps.
Finally, the harmonic model in TFA does not resemble the piano very much. Would be interesting to see how different harmonic models and temperaments in various historical keyboard instruments interact with the computation. The modern piano is equally tempered. In a harpsichord, that would generate a lot of roughness for the thirds which are way out of tune. The modern piano mitigates this by having the hammers strike strings at a position that avoids exciting the 5th harmonic (which produces a justly intoned third on top of fundamental frequency).
Would be interesting to see what kind of difference to the roughness calculation it would make to omit the 5th harmonic!