addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwchatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgoogleimageimagesinstagramlinklocation-pinmagnifying-glassmailminusmoremuplabelShape 3 + Rectangle 1outlookpersonplusprice-ribbonImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruseryahoo

Hands-on Clojure: Finding Anthills

Imagine the scene: a field of ants. When we look at it, we see three distinct groups. It 'just seems obvious' that there are three. But in fact that 'just seems obvious' feeling is what your brain tells you when it's just done a terrifyingly complicated calculation and doesn't feel the need to explain the details.

But how would we go about getting a computer to work out how many different anthills there are in such a picture, and where they're likely to be? It turns out that all you need to do is take averages.

We'll tackle this problem in our next hands-on coding session, which will be accessible to all, from beginner to expert. Come along with a laptop to join in the coding, or just to chat and enjoy a beer with other Clojurians.

Join or login to comment.

  • Ray M.

    As promised, some more source code for the mix:

    https://github.com/cam-clj/clustering/blob/master/src/clustering/k_means.clj

    This includes the code I used to generate the test data files. The k-means implementation is structured around the assumption that it would end up in the main loop of a Quil animation. I wasn't very happy with the way the animation turned out, I think you guys had much better results with the Incanter scatter-plots.

    November 18, 2013

  • Ragnar D.

    Thank you Ray for hosting, and everyone else for showing up.

    Me and Oliver got something working just in time, I tidied it up a little bit this morning and pushed it to github, in case anyone is interested:

    https://github.com/ragnard/camclj-anthills

    Comments/questions welcome. Some of it is less idiomatic/performant, but hey...

    Cheers!

    2 · November 15, 2013

    • Ray M.

      Thanks for sharing your solution. I'll tidy mine up and push to Github over the weekend for comparison.

      November 15, 2013

  • Ray M.

    Nice to see some new faces, and well done Thomas for the first complete solution!

    November 15, 2013

  • Thomas D.

    Enjoyable evening of chat and code -- thanks Ray.

    1 · November 15, 2013

9 went

Our Sponsors

  • O'Reilly

    * Review copies of books * 40% off printed books and 50% on e-books

  • Metail

    Supporting costs of this Meetup, venue and drinks at many events.

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy