deep learning notebook, lots of fixes
@@ -91,7 +91,6 @@ Go to your working directory and run notebooks in order:
|
||||
|
||||
Note:
|
||||
|
||||
* Notebooks 01-03 are uploaded with all of their cells run, so that one can see the data analysis. Notebooks 04-06 are uploaded without having been run.
|
||||
* Notebook 03 generates hold difficulty tables
|
||||
* Notebook 04 generates feature matrix
|
||||
* Notebook 05 trains models
|
||||
@@ -248,7 +247,7 @@ Here are some relationships between features and difficulty
|
||||

|
||||
|
||||
* higher angles allow for harder difficulties
|
||||
* distance between holds seems to correlate with difficulty
|
||||
* distance between holds seems to relate to difficulty
|
||||
* geometric and structural features capture non-trivial climbing patterns
|
||||
|
||||
We have a full feature list in [`data/04_climb_features/feature_list.txt`](data/04_climb_features/feature_list.txt). Explanations are available in [`data/04_climb_features/feature_explanations.txt`](data/04_climb_features/feature_explanations.txt).
|
||||
@@ -337,7 +336,6 @@ The model can still predict subgrades (e.g., V3 contains 6a and 6a+), but it is
|
||||
# Future Work
|
||||
|
||||
* Unified grade prediction across boards
|
||||
* Combined board analysis
|
||||
* Test other models
|
||||
* Better spatial features
|
||||
* GUI to create climb and instantly tell you a predicted difficulty
|
||||
|
||||
33
data/06_deep_learning/neural_network_summary.txt
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
### Neural Network Model Summary
|
||||
|
||||
**Architecture:**
|
||||
- Input: 48 features
|
||||
- Hidden layers: [256, 128, 64]
|
||||
- Dropout rate: 0.2
|
||||
- Total parameters: 54,657
|
||||
|
||||
**Training:**
|
||||
- Optimizer: Adam (lr=0.001)
|
||||
- Early stopping: 25 epochs patience
|
||||
- Best epoch: 109
|
||||
|
||||
**Test Set Performance:**
|
||||
- MAE: 1.885
|
||||
- RMSE: 2.401
|
||||
- R²: 0.644
|
||||
- Accuracy within ±1 grade: 33.1%
|
||||
- Accuracy within ±2 grades: 60.8%
|
||||
- Exact grouped V-grade accuracy: 27.1%
|
||||
- Accuracy within ±1 V-grade: 69.4%
|
||||
- Accuracy within ±2 V-grades: 89.5%
|
||||
|
||||
**Key Findings:**
|
||||
1. The neural network is competitive, but not clearly stronger than the best tree-based baseline.
|
||||
2. Fine-grained score prediction remains harder than grouped grade prediction.
|
||||
3. The grouped V-grade metrics show that the model captures broader difficulty bands more reliably than exact score labels.
|
||||
4. This makes the neural network useful as a comparison model, and potentially valuable in an ensemble.
|
||||
|
||||
**Portfolio Interpretation:**
|
||||
This deep learning notebook extends the classical modelling pipeline by testing whether a neural architecture can improve prediction quality on engineered climbing features.
|
||||
The main result is not that deep learning wins outright, but that it provides a meaningful benchmark and helps clarify where model complexity does and does not add value.
|
||||
BIN
images/05_predictive_modelling/gradient_boosting_predictions.png
Normal file
|
After Width: | Height: | Size: 451 KiB |
BIN
images/05_predictive_modelling/linear_regression_errors.png
Normal file
|
After Width: | Height: | Size: 170 KiB |
BIN
images/05_predictive_modelling/linear_regression_predictions.png
Normal file
|
After Width: | Height: | Size: 193 KiB |
BIN
images/05_predictive_modelling/random_forest_(tuned)_errors.png
Normal file
|
After Width: | Height: | Size: 192 KiB |
|
After Width: | Height: | Size: 466 KiB |
BIN
images/05_predictive_modelling/random_forest_errors.png
Normal file
|
After Width: | Height: | Size: 196 KiB |
|
Before Width: | Height: | Size: 100 KiB |
BIN
images/05_predictive_modelling/random_forest_predictions.png
Normal file
|
After Width: | Height: | Size: 470 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 36 KiB |
BIN
images/06_deep_learning/neural_network_feature_importance.png
Normal file
|
After Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 387 KiB After Width: | Height: | Size: 416 KiB |
|
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 157 KiB |
BIN
images/06_deep_learning/rf_vs_nn_comparison.png
Normal file
|
After Width: | Height: | Size: 57 KiB |
@@ -363,6 +363,7 @@
|
||||
" ax.set_title(f'{model_name}: Residual Plot', fontsize=14)\n",
|
||||
"\n",
|
||||
" plt.tight_layout()\n",
|
||||
" plt.savefig(f'../images/05_predictive_modelling/{model_name.lower().replace(\" \", \"_\")}_predictions.png', dpi=150, bbox_inches='tight')\n",
|
||||
" plt.show()\n",
|
||||
"\n",
|
||||
"\n",
|
||||
@@ -394,6 +395,7 @@
|
||||
" plt.suptitle('') # Remove automatic title\n",
|
||||
"\n",
|
||||
" plt.tight_layout()\n",
|
||||
" plt.savefig(f'../images/05_predictive_modelling/{model_name.lower().replace(\" \", \"_\")}_errors.png', dpi=150, bbox_inches='tight')\n",
|
||||
" plt.show()\n"
|
||||
]
|
||||
},
|
||||
|
||||
1303
notebooks/06_deep_learning.ipynb
Normal file
@@ -6,5 +6,4 @@ scikit-learn
|
||||
jupyter
|
||||
notebook
|
||||
torch
|
||||
sqlite3
|
||||
boardlib
|
||||
boardlib
|
||||
|
||||