Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
You are right. It's in the kata description: "if you have trouble discerning if the particular sequence of 1's is a dot or a dash, assume it's a dot".
I use my own implementation of k-mean with 0s and 1s together. in case of equal distances, the algorithm assign the value to smaller centroid (does this satisfy 'if you have trouble discernin if the particular ...'?).
The algorithm works fine except last two tests and I think I still have problem with initial centroids. Any hint about initialization?
Sure, I just can't miss it :)
Thanks... :) I hope you will try the 6x6!
Thanks for an amazing kata. It's very exciting! :)
Thank you very much! I'll retry and solve that as soon as I can. Once again, thank you for creating interesting katas! :)
Try now. :)
I haven't solved this kata so I can't see your comment.
Why do you use k-means separately for 0's and 1's? The logic determining their lenths is the same, as described in the kata.
The input (after you cut extra 0's at the ends) consists of something that's approximately 1 in length, also maybe something that's approximately 3 in length, and also maybe something that's approximately 7 in length. That should be the basis of your k-means.
I don't use scipy, I created my implementation, too. I use k-means twice with 0-token and 1-token, separately. About dots and dash, I think my solution handles it well, but not the spaces. I can pass all the short test, but the very long give me trouble. Thanks for helping :)
When this kata was created, scipy was not available here on CodeWars, so there was no any "version" of k-means available, so I had to create an implementation of my own, and it was a kind of a point.
Are you using both 0-token and 1-token lengths in calculating the statistics?
Also it's maybe worth quoting the kata description: "if you have trouble discerning if the particular sequence of 1's is a dot or a dash, assume it's a dot".
Which version of k-means algorithm can be used for this kata? With basic k-means algorithm (with some special init centroids), my solution can't pass the last two cases. I have trouble discerning spaces (0-bits).
P/s: Sorry for my bad English :). Anyway, this is an amazing kata!