A repository for hyperparameter tuning using Keras tuner for the creation of a surrogate model in the context of aircraft conceptual design. This code is associated with the work submitted in ASME Turbo Expo 2024, GT2024-127421 titled "Navigating Technological Risks: An Uncertainty Analysis Of Powertrain Technology In Hybrid-Electric Commuter Aircraft."
- Jerol Soibam
- Dimitra-Eirini Diamantidou
Python 3, TensorFlow, keras_tuner, numpy, matplotlib, pandas, scikit-learn, seaborn
To monitor the results during training, Tensorboard can be used with the following command:
- tensorboard --logdir=random_search/tb1_logs
Screenshots from training can be found in the "Plots" folder.
This section includes the necessary Python libraries for the project, including TensorFlow, Keras, and data preprocessing tools.
Load and preprocess the aircraft conceptual design data from CSV files, removing outliers and preparing features and targets.
Visualize the feature space with scatter plots to gain insights into the distribution of data.
Standardize and scale the data, and split it into training and testing sets.
Define the neural network architecture and hyperparameters for the Keras tuner.
Configure callbacks to enhance the model's performance and efficiency during the training process. Additional care was taken by introducing key callbacks:
-
ModelCheckpoint: Save the model's weights whenever there is an improvement in validation loss, ensuring progress is not lost.
-
EarlyStopping: Halt the training if there is no improvement in validation loss for 50 epochs, preventing overfitting and saving computational resources.
-
ReduceLROnPlateau: Dynamically adjust the learning rate when the validation loss plateaus, facilitating more precise weight adjustments and aiding in avoiding local minima. These callbacks collectively ensure a more robust and effective training process.
Perform hyperparameter tuning using Keras tuner's Random Search. For this repository, 5 trials were ran to showcase its capabilities. However, a larger number of trials was performed for the publication.
Retrieve the best hyperparameters and the corresponding neural network model.
Evaluate the best model on the test set, calculate metrics like R2 and RMSE, and visualize regression plots.