deep learning notebook, lots of fixes

This commit is contained in:
Pawel Sarkowicz
2026-03-29 16:56:30 -04:00
parent 3ab9b77bb7
commit e7b5db56d2
22 changed files with 1444 additions and 10206 deletions

View File

@@ -91,7 +91,6 @@ Go to your working directory and run notebooks in order:
Note: 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 03 generates hold difficulty tables
* Notebook 04 generates feature matrix * Notebook 04 generates feature matrix
* Notebook 05 trains models * Notebook 05 trains models
@@ -248,7 +247,7 @@ Here are some relationships between features and difficulty
![Correlation Heatmap](images/04_climb_features/feature_correlations.png) ![Correlation Heatmap](images/04_climb_features/feature_correlations.png)
* higher angles allow for harder difficulties * 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 * 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). 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 # Future Work
* Unified grade prediction across boards * Unified grade prediction across boards
* Combined board analysis
* Test other models * Test other models
* Better spatial features * Better spatial features
* GUI to create climb and instantly tell you a predicted difficulty * GUI to create climb and instantly tell you a predicted difficulty

View 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.

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 KiB

After

Width:  |  Height:  |  Size: 416 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -363,6 +363,7 @@
" ax.set_title(f'{model_name}: Residual Plot', fontsize=14)\n", " ax.set_title(f'{model_name}: Residual Plot', fontsize=14)\n",
"\n", "\n",
" plt.tight_layout()\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", " plt.show()\n",
"\n", "\n",
"\n", "\n",
@@ -394,6 +395,7 @@
" plt.suptitle('') # Remove automatic title\n", " plt.suptitle('') # Remove automatic title\n",
"\n", "\n",
" plt.tight_layout()\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" " plt.show()\n"
] ]
}, },

File diff suppressed because it is too large Load Diff

View File

@@ -6,5 +6,4 @@ scikit-learn
jupyter jupyter
notebook notebook
torch torch
sqlite3 boardlib
boardlib