Predicting flight cancellations with a generic two-layer artificial neural network
Predicting flight cancellations with a generic two-layer Artificial Neural Network
neural_network.py
andactivation_functions.py
are generic. The artificial neural network is set to initialize to two layers, with
400 neurons in the first hidden layer and 250 neurons in the second hidden layer.
This neural network architecture is configured to work with
flight delays data,
which load_data.py
transforms into 368 binary input variables.
The neural network uses a
leaky rectified linear unit#Leaky_ReLUs)
activation function to compute the hidden layers, and a sigmoid activation function to
compute the output layer (which is a binary classification in the case of predicting
flight cancellations). It is straightforward to modify the specified activation function
for the output layer (don’t forget the associated derivative in back propagation), though
care needs to be taken as the learning rate likely requires a lower initial value if
the network is adapted to perform regression.
train_network.py
in command lineThe training data file ‘./flightdelays_data.csv’ is required. The user can specify
python train_network.py 2
predict_claims.py
in command line:The user will be prompted to specify the path to a .csv file with the test data.
python predict_claims.py