# Observing Dark Worlds – Visualizing dark matter’s distorting effect on galaxies

Some people like to do crossword puzzles. I like to do machine learning puzzles.

Lucky for me, a new contest was just posted yesterday on Kaggle. So naturally, my lazy Saturday was spent getting elbow deep into the data.

The training set consists of a series of ‘skies’, each containing a bunch of galaxies. Normally, these galaxies would exhibit random ellipticity. That is, if it weren’t for all that dark matter out there! The dark matter, while itself invisible (it is dark after all), tends to aggregate and do some pretty funky stuff. These aggregations of dark matter produce massive halos which bend the heck out of spacetime itself! The result is that any galaxies behind these halos (from our perspective here on earth) appear contorted around the halo.

The tricky bit is to distinguish between the background noise in the ellipticity of galaxies, and the regular effect of the dark matter halos. How hard could it be?

Step one, as always, is to have a look at what you’re working with using some visualization.

An example of the training data. This sky has 3 dark matter halos. I f you squint, you can kind of see the effect on the ellipticity of the surrounding galaxies.

If you want to try it yourself, I’ve posted the code here.

If you don’t feel like running it yourself, here are all 300 skies from the training set.

Now for the simple matter of the predictions. Looks like Sunday will be a fun day too! Stay tuned…

## 9 thoughts on “Observing Dark Worlds – Visualizing dark matter’s distorting effect on galaxies”

1. Walter Reade says:

Thanks! Nice visualization and I appreciate you sharing the code. I’m also working on the contest (using Matlab as my tool of choice).

2. Erin Hodgess says:

Hi! Where do you get the data sets from, please?
Thanks,
Erin

3. This is great work, thanks for sharing

4. Rahul Biswas says:

How to extend it to 2, 3 Halos? I am having trouble to determine a formula for more than one halo.

5. Corey –

I always appreciate your insight and your willingness to share it.