In tsaopy
we assume that the time series can be modelled as a function $x(t)$ that satisfies a differential equation of the form
and we want to find the $a_n$, $b_n$, $c_{ij}$, $\mathfrak{f}_n$ values that best fit our time series data.
By proposing a set of parameter values and initial conditions we can compute a trajectory by numerically solving the differential equation.
numpy.f2py
.Once we compute a trajectory with the proposed parameter values ($\theta$), we can compare the simulated data points($f_\theta$) with the real measurements($Y$) with an error or cost function. By default tsaopy
uses the ‘negative logarithmic likelihood’ of the measurements given the proposed parameters
minimizing this function is equivalent to performing a maximum likelihood estimation (MLE). The function can be minimized with any multivariate minimizer such as minimize
from scipy.optimize
.
After MLE, we use the MCMC implementation emcee
to find the posterior distribution of the parameters. This allows us to