The following repository contains the code described in the "Upcoming Paper" paper written by John D. Hefele, Francesco Bortolussi, and Simon Portegies Zwart. The code is under the GNU license, so anyone interested is welcome, and encouraged, to download and experiment with any scripts in this repository. For any questions, send an email to jdavidhefele@gmail.com.
Contains the scripts to train and test the 1-Dimensional Convolutional Neural Network using Tensorflow. Below is an illustration of its architecture... ![alt text][nn_architecture] [nn_architecture]: The network is designed to take a 50x5 orbital element matrices, for each asteroid, as input. For more information regarding the structure of the data, please refer to the paper mentioned above.
To train the neural network, simply run...
python NN_Conv.py new/load weights_token
where new/load
should be set to either new
or load
depending on whether the user wants to start training from scratch or use an existing set of weights as a starting point. All weights are saved in the NN/Weights_Baises
folder. Most hyper-parameters (such as the batch size, stride length, number of neurons per layers, etc.) are located at the top of the script.
The nn_functions.py
script contains contains the functions to initialize a new set of weights, save the current set of weights, or load a set of previous weights. Additionally, this script contains the eval_function
which prints some statistics regarding the networks performance. An example output is shown below...
![alt text][eval_output]
[eval_output]:
The three ratings shown correspond to the 3 most hazardous objects as identified by sentry. In addition to printing statistical information, this script also generates a "hazard matrix", which is contains the name, label, hazard rating, average orbital element values, and the standard deviation for each orbital element.
HOI.py
simply uses an existing set of weights to assign hazard ratings to asteroids.
As the name implies, this contains all the data to train/test the network, and all of the output generated from the numerous scripts. The Data/Plots
folder contains many of the plots, which were used in the paper.
HM_Analyzer.py
takes a hazard matrix generated by either NN_Conv.py
or HOI.py
and uses it to generated a series of plots and print some statistical information.
closeness_analyzer.py
takes the data generated by the scripts in the Asteroid_Simulator
folder and uses it to create a histogram comparing the closest approaches of asteroids which were identified as hazardous and those that were not.
The Data_Prepers
folder contains all of the scripts used to convert the original cartesian matrices to the 50x5 orbital element matrices used to train/test the neural network.