Added the k means clustering visualisation example#52
Open
scarlettjclark wants to merge 2 commits intostandupmaths:mainfrom
Open
Added the k means clustering visualisation example#52scarlettjclark wants to merge 2 commits intostandupmaths:mainfrom
scarlettjclark wants to merge 2 commits intostandupmaths:mainfrom
Conversation
Made a new example that visualises the machine learning technique of k means clustering on the Christmas tree and added the code that was used to generate it to the readme file.
Contributor
|
Hey, I couldn't confirm your animation because the two simulators that I tried so far were too picky on the format. Because (a) one line number (at least) isn't as expected "Skipping frames not supported (Line 106, expected frame number 104, got 1)" (on simulator #26 ) and (b) you forgot the last LED, your header ends with R_498,G_498,B_498 when there should be a 499th triple (where at least #11 resulted in no activated lights at all). I know I should remember k means clustering. But ML isn't my strength so I forgot almost all of that already. |
Fixed bugs in the linked code where it'd drop the first entry in the coords file and the steps of the sequence wouldn't be sequential, then used the code to generate a new csv file. Thanks @d-albrecht
Contributor
|
Thanks for the fix, now it's working and it looks just as expected. As I commented to another PR, it is awesome to see this work out in 3D when most of the time those ideas are taught in 2D only. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Made a new example that visualises the machine learning technique of k means clustering on the Christmas tree and added the code that was used to generate it to the readme file.
K means clustering is a machine learning technique that attempts to split data into clusters. It's output is k "centroids" that can be used to decide what group future data is in by measuring which centroid is closest. This visualisation takes the group assignment of each light on the tree at each iteration of the algorithm and colours them accordingly, and colours the lights that are closest to the current position of the centroid in a different colour. It, by default, provides a visualisation of k=2, 3, 5 and 7. The associated github repo has code that allows different ks to be given, different colours to be used for the clusters and centres, and for the speed of the animation to be adjusted.