Yamakei.info

Notes on building reliable software with AI in the loop.

Trail Route Analytics (Neural Network Prototype)

An exploratory application of neural networks to GPS-based trail performance prediction.

2017-03-01

Trail Route Analytics neural network demo

Executive Summary

This project explored the use of neural networks to model trail running and mountaineering performance using GPS-derived features. It was an experimental extension of the original Trail Route Analytics work, which relied on first-principles velocity modeling and threshold-based analysis.

The goal was not immediate productization, but to evaluate whether neural networks could better capture nonlinear relationships between terrain, effort, and performance -- and to understand the tradeoffs involved.

This work was conducted after completing Andrew Ng's Machine Learning course in 2016, which provided the theoretical foundation for applying neural networks responsibly and critically.


1. Motivation

The original Trail Route Analytics model used explicit decomposition of horizontal and vertical velocity, normalization techniques, and a threshold velocity concept to predict route completion time.

While effective and interpretable, that approach required manual feature design and assumptions about how performance scales with terrain.

Neural networks offered a potential alternative:

  • Learn nonlinear relationships automatically
  • Reduce manual feature engineering
  • Adapt to complex interactions between inputs

The question was not "can a neural network fit the data," but whether it meaningfully improved insight and predictive usefulness.


2. Learning Context

Before attempting this work, I completed Andrew Ng's Machine Learning course (2016), which covered:

  • Supervised learning fundamentals
  • Bias-variance tradeoffs
  • Neural network architectures
  • Gradient descent and optimization
  • Overfitting and regularization

This grounding influenced how the prototype was approached: cautiously, experimentally, and with an emphasis on understanding failure modes.


3. Approach

The neural network model was built using Keras on top of TensorFlow.

Inputs included:

  • GPS-derived features
  • Route characteristics
  • Derived metrics from earlier analytical models

The model was trained to predict:

  • Route completion time
  • Performance characteristics under varying terrain profiles

Multiple configurations were tested to observe:

  • Sensitivity to parameter changes
  • Stability of predictions
  • Generalization across routes

4. Observations and Tradeoffs

Several key observations emerged:

  • Neural networks could fit historical data well, but were sensitive to training parameters and data distribution.
  • Small changes in hyperparameters could significantly affect predictions.
  • Interpretability was substantially reduced compared to the analytical threshold-velocity model.
  • Understanding why a prediction changed became more difficult.

These tradeoffs mattered because the original problem domain -- trail and mountaineering performance -- benefits from explainable models users can trust.


5. Why It Was Not Productized

Despite technical success, this approach was not productized.

Key reasons:

  • Reduced explainability compared to analytical models
  • Limited robustness with sparse or noisy GPS data
  • Higher operational and maintenance complexity
  • Marginal improvement in actionable insight

The experiment clarified that more flexible models are not always better models, especially when user trust and understanding are important.


6. What This Project Demonstrates

This artifact demonstrates:

  • Early, principled engagement with machine learning techniques
  • Willingness to experiment without forcing outcomes
  • Ability to evaluate modeling approaches critically
  • Preference for clarity and usefulness over novelty

It also reflects an important engineering discipline: knowing when not to ship.


7. Relationship to Other Work

This prototype sits between:

  • The first-principles Trail Route Analytics model (analytical, interpretable)
  • Later AI-assisted systems where AI accelerates execution but humans retain decision authority

Together, these projects reflect a consistent theme: tools change, but judgment remains central.


References

  • Blog: https://trail-route-analytics.blogspot.com/2017/02/trail-route-analytics-attempt-to.html
  • Blog: https://trail-route-analytics.blogspot.com/2017/03/how-parameters-affects-prediction.html
  • Source code: https://github.com/yama-kei/trail_analyzer
  • ML Certificate (Andrew Ng): https://www.coursera.org/account/accomplishments/verify/WU6YHXTP6S28