Using ML to find exoplanets - Dataset from Kaggle
Source - Exoplanet Hunting in Deep Space
- 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
- 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
- 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
'sStandardScaler
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
- 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
- One Convolution Layer (
- 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
- Two Dense Layers (
- Matrix reduction part
- 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
- Getting accuracy and loss values with the basic
model.evaluate(x,y)
- Getting the confusion matrix with
Sklearn