The core of this analysis uses the PyMC3 probabilistic programming package.
PyMC3 is a Python package for Bayesian statistical modeling and Probabilistic Machine Learning which focuses on advanced Markov chain Monte Carlo and variational fitting algorithms.
To analyze the learning of the animals over time, a Stochastic volatility model is implemented. Stochastic volatility models model the highly variable nature of some timeseries with a latent volatility variable, modeled as a stochastic process.
To run this analysis, follow the guidelines outlined in the instructions file.
The other files contained in this codebase are alternative analyses including plotting a 10-trial moving average of the animals' performance, and a state space analysis in Matlab.