- Anaconda3
- Python 3.6.x
- jupyter notebook
- Tensorflow 1.14
- Keras 2.2.4
- numpy 1.16.2
- matplot 3.1.0
import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
- activate virtualenvironment with package management system such as pip or anaconda.
- Run the jupyter notebook.
- Run Exo.ipynb.
- You can modify second block your own dataset about Exoplanet.
- Run!
We got 99.12% accuracy on the test dataset
- Add an initializer to initialize every weight to a random number before training instead of 0 as default value.
tf.keras.initializers.RandomUniform(minval=-500, maxval=500, seed=None)
- Playing with the optimizer by lowering the learning rate.
optimizer=(tf.keras.optimizers.Adagrad(lr=0.02, epsilon=None, decay=0.0)
- Make more epochs with larger batches.
model.fit(data_train, label_train, validation_split=0.1, batch_size=100, epochs=5)
- Make a deeper network with more layers. and changing the activation function.
tf.keras.layers.Dense(512, activation=tf.nn.relu),
tf.keras.layers.Dense(64, activation=tf.nn.sigmoid),
tf.keras.layers.Dense(2, activation=tf.nn.sigmoid)
- Add dropout layers, it prevent for overfitting while allowing for better training.
tf.keras.layers.Dropout(0.5)
- Change the loss function.
loss='binary_crossentropy
- Change/Tweak the optimizer.
optimizer=(tf.keras.optimizers.Adagrad(lr=0.02, epsilon=None, decay=0.0)
- Trying other type of network.
tf.keras.layers.Dense(512, activation=tf.nn.relu),
tf.keras.layers.Dense(64, activation=tf.nn.sigmoid),
tf.keras.layers.Dense(2, activation=tf.nn.sigmoid)