File size: 2,456 Bytes
9c8e4f0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
---
library_name: pytorch
tags:
- tabular
- pytorch
- classification
- aviation
- wing-design
datasets:
- ecopus/transport-wings-500
license: mit
---
# Wing Selector MLP
This repository contains a PyTorch MLP that scores aircraft-style wings **within the same airfoil** for a chosen objective:
- **min_cd** (minimize drag),
- **max_cl** (maximize lift),
- **max_ld** (maximize lift-to-drag).
It was trained on the dataset **[ecopus/transport-wings-500](https://huggingface.co/datasets/ecopus/transport-wings-500)**.
## Files
- `best.pt` – best checkpoint by validation top-1@group
- `last.pt` – final checkpoint after training
- `config.json` – input dim, #airfoils, feature scaler stats
- `feature_names.json` – expected feature order
- `airfoil_vocab.json` – airfoil name → id mapping used during training
- `inference.py` – minimal loader & scoring helper
---
### Model Architecture
The model is a feedforward neural network designed for a binary classification task. It predicts the "best" wing geometry for a given airfoil and aerodynamic objective.
* **Inputs**: The model takes three inputs:
1. **Wing Features**: A vector of 22 continuous features describing the wing's geometry and aerodynamic properties. These features are standardized (mean-centered and scaled by standard deviation) before being fed into the model.
2. **Objective ID**: A one-hot encoded vector representing one of the three possible design objectives.
3. **Airfoil ID**: An embedding vector that learns a representation for each unique airfoil in the training data.
* **Embedding Layer**: An `nn.Embedding` layer converts the discrete airfoil ID into a dense 8-dimensional vector.
* **Hidden Layers**: The core of the network consists of two fully connected hidden layers, each with **128 neurons** and using the **ReLU** activation function.
* **Output Layer**: A final linear layer outputs a single logit, which represents the model's prediction score.
---
### Training Hyperparameters
| Hyperparameter | Value |
| :--- | :--- |
| **Epochs** | 50 |
| **Batch Size** | 64 |
| **Learning Rate** | `2e-3` |
| **Optimizer** | AdamW |
| **LR Scheduler** | CosineAnnealingLR |
| **Loss Function** | BCEWithLogitsLoss |
| **Seed** | 42 |
---
### Final Training Metrics
| Metric | Value |
| :--- | :--- |
| **Validation AUC** | 0.9790 |
| **Validation Avg. Precision**| 0.638 |
| **Validation Top-1 Accuracy**| 50.0% | |