Skip to content

edgemindstudio/FeedforwardNeuralNetwork-Flight

Repository files navigation

Flight Pitch Prediction using a Feedforward Neural Network from Scratch

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.


📊 Dataset

The model uses a cleaned and preprocessed dataset named flight_12477, with features such as:

  • altitude
  • indicated_airspeed
  • pitch_t-1
  • roll

The target variable is the next pitch value (pitch_t), derived by shifting pitch_t-1 forward.


🧠 Model Architecture

  • 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

⚙️ How to Run

🔧 Prerequisites

Make sure to install dependencies:

  pip install -r requirements.txt

🔧 Run with Default Hyperparameters

  python3 NNModelFlight.py

🔧 Run & Change Hyperparameters

  python3 NNModelFlight.py --epochs 500 --learning_rate 0.01 --gradient_descent stochastic --hidden_size1 4 --hidden_size2 2

🔧 Apply the Model to Predict the 4 Input Values

  python3 NNModelFlight.py --target pitch
  python3 NNModelFlight.py --target altitude
  python3 NNModelFlight.py --target indicated_airspeed
  python3 NNModelFlight.py --target roll

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages