Skip to content

Instantly share code, notes, and snippets.

@KeironO
Created January 9, 2016 22:27
Show Gist options
  • Save KeironO/2bc1642193373621948e to your computer and use it in GitHub Desktop.
Save KeironO/2bc1642193373621948e to your computer and use it in GitHub Desktop.
/usr/bin/python2.7 /home/keiron/.projects/lethality_prediction/python_files/wormbase_predict.py
Using Theano backend.
Loading the dataset...
- Loading the raw dataset from ../data/Worm_Dropshilla_Lethality.arff
- Vectorising the raw dataset into a format suitable for Neural Networks
- Randomly shuffling the dataset, to ensure proper results
- Splitting the dataset into separate training and testing sets
Now for the Deep Learning bit...
- Modelling the Neural Network
- Training the model
Train on 300 samples, validate on 75 samples
Epoch 1/8
300/300 [==============================] - 4s - loss: 0.5245 - acc: 0.6633 - val_loss: 0.3111 - val_acc: 0.8667
Epoch 2/8
300/300 [==============================] - 4s - loss: 0.3041 - acc: 0.9000 - val_loss: 0.2125 - val_acc: 0.8933
Epoch 3/8
300/300 [==============================] - 4s - loss: 0.2455 - acc: 0.9033 - val_loss: 0.1930 - val_acc: 0.8933
Epoch 4/8
300/300 [==============================] - 4s - loss: 0.2162 - acc: 0.9167 - val_loss: 0.1547 - val_acc: 0.9333
Epoch 5/8
300/300 [==============================] - 4s - loss: 0.2028 - acc: 0.9300 - val_loss: 0.1586 - val_acc: 0.9200
Epoch 6/8
300/300 [==============================] - 4s - loss: 0.1921 - acc: 0.9267 - val_loss: 0.1661 - val_acc: 0.9200
Epoch 7/8
300/300 [==============================] - 4s - loss: 0.1895 - acc: 0.9267 - val_loss: 0.1318 - val_acc: 0.9200
Epoch 8/8
300/300 [==============================] - 4s - loss: 0.1818 - acc: 0.9300 - val_loss: 0.1452 - val_acc: 0.9200
- Testing the model
- Returning the classification report of the test
precision recall f1-score support
0 0.76 0.94 0.84 17
1 0.98 0.91 0.95 58
avg / total 0.93 0.92 0.92 75
- Returning the confusion matrix of the test
[[16 1]
[ 5 53]]
Process finished with exit code 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment