# How can I improve the results of my clustering

I am working on a project with the idea to cluster the sound waves of key strokes on a computer. So far what I have done was recorded about 50 keystrokes per key (only have done 1 - 10 so far), found their peaks and isolated the waveforms, then I created a chroma vector as the Feature Vector and run k-means on the resulting feature matrix.

After some very minor filtering I was able to get an accuracy of about 90% (taking accuracy as the mode cluster label for a group of keys as the true value, how many are the true value / total values). However, when I try to essentially classify new data it is far from accurate.

My initial thoughts as to why this probably wont work:

1. The difference in any audio feature between keystrokes is minimal
2. Many many more samples are required
3. Clustering is not the best approach here (I don't have any formal reasoning here but I would guess a supervised alg would work better).
4. The pre-processing I'm doing is not right. The only things I have done were normalize the audio files and use a smoothing function on the waveforms (no frequency analysis here!).

Any suggestions are appreciated.

• You want to classify keystroke sound to particular key? What is your validation methodology? – Piotr Rarus - Reinstate Monica Dec 4 '19 at 8:35
• Yes but I want to do so using unsupervised clustering techniques such as k-means or spectral clustering. Is there a way to use the existing key labels (this key is an "a") to guide the unsupervised clustering (so a semi-supervised clustering per se)? – joshy.poo Dec 5 '19 at 16:56
• Do even think this is possible? For me most of the keys sounds the same, except maybe for space and return. – Piotr Rarus - Reinstate Monica Dec 5 '19 at 18:02