First Couple Of Weeks Of Google Summer of Code

1 minute read

The first two weeks of GSoC have ended and completely flipped my sleep cycle around (:P), but it has been a lot of fun and a great learning experience so far. In this blog post I would like to discuss the stuff I have worked on in these two weeks.

1. First Differencing in loss objective.

We started off with handling #72 which involved adding first differencing to the L2Loss objective.


You can now assign a weight (vector or scalar) to use the first differencing technique in the L2 loss. Adding first differencing is helpful in cases where the L2Loss alone leads to non-identifiable parameters but adding a first differencing term makes it more identifiable. This can be noted on stochastic differential equation models, where this aims to capture the autocorrelation and therefore helps us avoid getting the same stationary distribution despite different trajectories and thus wrong parameter estimates.

2. Maxmimum A Posteriori

Next on the list was adding a MAP estimator to the parameter estimation tooling. This didn’t involve much of work and was finished up quite fast. An option to pass prior distributions for the parameter was added to the build_loss_objective function, as a keyword argument priors, it can take in either an array of univariate distributions for each of the parameters or a multivariate distribution.

3. Multiple Shooting version of the objective function

This was a massive PR with 22 commits and a month of time (we had started working on it from the bonding period). The issue regarding this can be found here #22. Multiple Shooting is generally used in Boundary Value Problems (BVP) and is more robust as compared to the regular objective function used in these problems. It proceeds as follows:

  1. Divide up the time span into short time periods and solve the equation with the current parameters which here consist of both, the parameters of the differential equations and also the initial values for the short time periods.
  2. This objective additionally involves a dicontinuity error term that imposes higher cost if the end of the solution of one time period doesn’t match the begining of the next one.
  3. Merge the solutions from the shorter intervals and then calculate the loss.

That is all for my GSoC work so far I will keep updating the blog ahead.