Git Product home page Git Product logo

hunting-exoplanets's Introduction

Hunting Exoplanets

Using ML to find exoplanets - Dataset from Kaggle

Understanding our data

Source - Exoplanet Hunting in Deep Space

1. Take care of labels

  • 2 is an exoplanet star and 1 is a non-exoplanet-star according to the dataset description
  • Change that to 1 for exoplanets and 0 for non exoplanets

2. Understand how exoplanets are labeled

  • To do this we create plots for exoplanets and non exoplanets luminosity
  • After doing so we can see that exoplanets have a greater luminosity than non exoplanets
  • We are also comparing the mean of the luminosity so we can have a better understanding

Predicting labels

Clean up our data

  • If we feed our model unprocessed data it will get confused and it will probably mess everything up
  • First I'm scaling the data using Sklearn's StandardScaler class
  • Now, I want to have our data shaped as 3D Tensors, because we're going to use a CNN model to predict the labels

Creating and training the model

  • I've created a CNN with:
    • Matrix reduction part
      • One Convolution Layer (Conv1D) - with 64 filters and a kernel of size 10
      • One Pooling Layer (MaxPooling1D) - with 4 strides
    • FC part
      • Two Dense Layers (Dense) - with 64 units and the relu activation function
      • One Output Layer (Dense) - with only 1 neuron and the softmax function
  • I've complied everything using the crossentropy loss function and the adam optimizer
  • For the training part I choosed 4 epochs with batches of size 32
  • The model automatically saves it's weights once an epoch is completed

Evaluating our model

  • Getting accuracy and loss values with the basic model.evaluate(x,y)
  • Getting the confusion matrix with Sklearn

hunting-exoplanets's People

Contributors

sturzamihai avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.