# Modeling cumulative impact — Part I

The fitness-fatigue model characterizes both as exponentially decaying quantities of the form:g(t) = k * exp(-t / τ),where k is the initial quantity and τ is the “decay time constant.

” (While fitness-fatigue is a domain specific model, the reader is likely aware of other phenomena approximated by exponential decay, such as radioactive decay, memory loss, and even beer froth recession.

) The key difference between the two is that the decay time constant is much larger for fitness; in H.

T’s case, τ_1 = 60 for fitness vs τ_2 = 13 for fatigue.

This leads to a substantial difference in the impulse response:Under typical fitness-fatigue configurations, fatigue decays much more quickly than fitness.

The impulse from fatigue at any time, however, is typically much greater than the impulse from fitness.

These exponential models describe the decay of fitness and fatigue from initial levels, but H.

T.

’s fitness and fatigue levels through time are based on the effects of many past training sessions.

Applying the superposition principle (true for all linear systems), the total response to a set of stimuli is the sum of the responses to the individual stimuli.

Thus H.

T.

’s fitness and fatigue at any point in time is defined by the sum of the time-diminished effects of all past training sessions.

This operation is mathematically handled by the discrete convolution of the training history with an exponential decay function:There are an infinite number of such features that could be constructed with a single training history, first by modulating τ in the equation above, and later from models other than pure exponential decay.

Based on the estimates given in BCL94, H.

T.

’s personal fitness-fatigue model of hammer throwing performance is:Though it’s possible to code in a compact fashion, computing the fitness and fatigue features involves inner and outer loops through the data.

This leads to the following trajectories for H.

T.

’s fatigue, fitness, and relative (baseline-removed) performance:The plot above shows H.

T.

’s modeled antagonistic fitness (green) and fatigue (red) levels over time, as well as H.

T.

’s modeled performance sans the offset (i.

e.

, 0.

07 * fitness — 0.

27 * fatigue).

The final simulated performance also includes a small amount of pseudo-random Gaussian noise to create a more realistic scenario for estimation.

EstimationTo estimate the parameters in the fitness-fatigue model, BCL94 first create a grid of values for time constants τ_1 and τ_2.

Treating the time constants as known at each point in the grid, fitness and fatigue are calculated through time.

Ordinary multiple regression is used to fit E(p_n) = μ+k_1 * fitness_n – k_2 * fatigue_n, where n increments through time and the residual sum of squares (RSS) is recorded at each step.

The pair of time constants with the smallest RSS combined with their associated regression estimates complete the estimation.

Alternatively, parameters can also be recovered directly with nonlinear minimization of the sum of squares residuals:The fitness-fatigue parameters can be recovered using non-linear minimization of mean squared error, but it required some tweaking in R.

The “BFGS” method offered by R’s general purpose optimizer optim worked well for this example, but choosing reasonable initial values was still necessary.

With only two time-varying parameters and closed form solutions at each level, the “grid search” used by BCL94 is an attractive method of estimation.

Below is a full picture of the simulated actual performance (including the Gaussian noise) and the predictions from the fitted model:The points are the actual (simulated) performance measurements from H.

T.

; the blue line is the fitness-fatigue model’s predictions through time.

Discussion and Next StepsThis article has examined a model of athletic performance that makes use of two antagonistic, convolution-based features to encode the effects of training.

Both features were discrete convolutions of training intensity with exponential decay, differing only by time constants.

The model is nonlinear in the complete set of parameters but linear when the time constants are fixed and considered known, making grid search a viable method of estimation.

While the fitness-fatigue model is a domain specific model from physiology, it suggests a more general feature engineering strategy: when there is a sequence of events with impacts that persist but also decay through time, construct features from convolutions with exponential decay.

Try different time constants, or use cross-validation with grid search to explore different possibilities.

The next part of this series moves past assuming exponential decay from a theoretical model, examining the use of splines to model a general decay profile.

It will be more useful when the theory at hand is limited, or you just don’t trust the model that exists.

Since this author does trust the model of exponential memory decay, stay tuned for Part II.

References T.

Busso, R.

Candau, and J.

Lacour, Fatigue and fitness modelled from the effects of training on performance (1994), European Journal of Applied Physiology R.

Morton, R.

Fitz-Clarke, E.

Banister, Modeling human performance in running (1985), Journal of Applied Physiology.