David Given

Results 548 comments of David Given

Yes, I am interested; can this technique be applied to non-MFM formats? From looking at the code, it seems that kmedian.py knows nothing about the format itself, so it seems...

I did a first draft of the optimal k-median code in C++, just optimalKMedian(). It's a simple mechanical translation of kristomu's source with some C++isms. Naturally it doesn't work. https://github.com/davidgiven/fluxengine/blob/kmedian/lib/kmedian.cc...

D'oh. Yes, after fixing that, it produces exactly the right results; see the four lines at the bottom for the new algorithm. From your comment, the weighted version should be...

> With this, I get the expected {22, 34, 47.5} clustering with test case {22, 36, 35, 22, 22, 23, 37, 22, 35, 47}. After adding the test case... are...

Yeah, I figured out I could just run the python version about five minutes after I posted! I have the weighted code working now --- yes, it's drastically faster, even...

So having reworked the decoders to use the new system, I've tried it in real life. It seems to be marginly _worse_ than the old code. This could be something...

I've attached it --- it's a simple Workbench image. I think. (I should get an Amiga; I hear they're cool.) [amiga.zip](https://github.com/davidgiven/fluxengine/files/4841203/amiga.zip) I'd think that the most likely candidates for problems...

Do you have any specific test case for the precision issue? I'd like to look into that more; eventually I'd rather like to convert the algorithm to use integers and...

Sorry, I've been buried in other things --- I owed you a reply... That's an interesting idea. It's actually not dissimilar to what I'm doing right now, which is to...

Well, that was stupid. I was looking at the wrong bit of the side byte, which meant I was thinking that all sectors were side 0. Please try again ---...