Built with datascienceportfol.io

Web Scraping and Machine Learning: Building a Normal Spiral vs. Barred Spiral Galaxy Classifier (IN PROGRESS)

Project photo

Project links

Skills

About this project

This is an in-progress side project of mine that I've started as a way to familiarize myself with both web scraping and machine learning techniques. The premise of this project is to classify scientifically reduced images of galaxies into two classes: normal spiral galaxies and barred spiral galaxies. The differentiating feature between them is the presence or absence of a central bar, essentially a dense collection of stars in the central parts of the galaxy. The galaxy images were taken from the Carnegie Irvine Galaxy Survey, a galaxy survey conducted by my PhD advisor and his collaborators that was started over 10 years ago to study galaxies in the Southern Hemisphere.

One of the hardest parts of this project was simply getting all the data! The survey contains over 600 images of galaxies, and some are not clear-cut cases of normal spirals vs. barred spirals (these were classified by my advisor and his collaborators already), so I had to find a way to download all the data of galaxies that were either clear-cut normal spirals vs. barred spirals off of the CGS website. Technically, I could have also just asked my PhD advisor for the data, and he would have obliged, but I had never scraped a website before, so I thought it would be a fun introduction to the subject!

The two notebooks I have linked show my progress with the data acquisition and the machine learning, though as I've said, this is still a work in progress. There is a class imbalance between the amount of normal spirals and barred spirals, and there's only about ~100 images of each case, with about 2 times as many normal spirals than barred spirals in the dataset, so I'll probably have to perform some feature augmentation (rotations, shifts, etc.) to the images from each class in order to have a larger training dataset and then make sure the number of spirals and barred spiral images are roughly equivalent.