This project implements a custom-built feedforward neural network (with support for stochastic or batch gradient descent) to predict flight pitch using real-world aviation data. No machine learning libraries like TensorFlow or PyTorch are used — everything is implemented using pure NumPy and Python.
The model uses a cleaned and preprocessed dataset named flight_12477, with features such as:
altitudeindicated_airspeedpitch_t-1roll
The target variable is the next pitch value (pitch_t), derived by shifting pitch_t-1 forward.
- Input Layer: 4 features
- Hidden Layer 1: Configurable (default: 4 neurons, ReLU)
- Hidden Layer 2: Configurable (default: 2 neurons, ReLU)
- Output Layer: 1 neuron (Linear)
Supports:
- Batch Gradient Descent
- Stochastic Gradient Descent
- Early Stopping
- Mean Squared Error and Mean Absolute Error tracking
- Gradient norm and activation plotting
- Parameter saving and logging
Make sure to install dependencies:
pip install -r requirements.txt python3 NNModelFlight.py python3 NNModelFlight.py --epochs 500 --learning_rate 0.01 --gradient_descent stochastic --hidden_size1 4 --hidden_size2 2 python3 NNModelFlight.py --target pitch python3 NNModelFlight.py --target altitude python3 NNModelFlight.py --target indicated_airspeed python3 NNModelFlight.py --target roll