GSoC Diaries #5: A Week Off and Some Planning

Hey,

In the last blog post, I talked about the idea of working on residual plots and error plots and my decision to tackle the issue of the lack of an x argument as an optional covariate in the ppc_error_binned function to quickly implement something. The implementation wasn’t very complicated, and I quickly created a PR about it, which was then merged to the master branch after a small update from one of my mentors and the maintainer of the bayesplot package, Jonah. Apparently, I forgot that there was a new way that we were using to label the x-axis, which I didn’t follow, so he updated the code to follow the same way, and it was good to go. Honestly, it felt so good that there wasn’t much work needed on that PR, especially because I was planning to take a week off to travel in the Nordics with my family and some of their friends. As a result of my spending a week wandering around Copenhagen -which I absolutely loved- and Stockholm -which I didn’t really like that much- I knew I wouldn’t be able to push any new code, so that PR about ppc_error_binned going through smoothly upped my mood quite a bit.

Getting back to work last Monday after a week off, I wasn’t sure of what to do next. As I said before, second part of working with residual plots that I mentioned on my issue, implementing a new plot -possibly- named ppc_residual which would plot y – stat(y_rep) on the y-axis and stat(y_rep) on the x-axis, required careful thinking and planning about how do we want to structure error plots and residual plots so that they make the most sense to users. As this was not something that I could decide on my own, I decided to call a meeting with my mentors Jonah, Aki, and Teemu to discuss this, and then we settled on Thursday as the meeting date.

Since I didn’t want to sit and do nothing in the meantime, I decided to pick up another task that we put on our GitHub project and turned it into an issue: Emphasising discreteness of data in rootograms. This was something that Säilynoja et al1 proposed in their preprint, which simply meant adding an alternative look to rootograms so that their discreteness is more explicit than they are at the moment. This, in my opinion, was a fair point to raise because rootograms are designed to visualise discrete data points, while the visual items in rootograms were continuous, such as lines and fields that normally represent continuity. As this issue is separate from the residual plot discussions, it seemed like a nice new avenue for me to pursue while we are deciding on the fate of residual and error plots. Unfortunately, though, it appeared to be more complicated than I thought. Adding a completely new aesthetic option to an existing graph, especially one that is a little complicated, like the proposed rootogram, takes some time to get right. I made some progress; however, at the moment, it is not good enough to create a PR about it. My first goal for the next week is to finish up that implementation quickly so that it can get merged into the main branch soon.

That is not all in this blog post, of course. As I told you, we had a meeting last Thursday to discuss how we want to shape error plots and residual plots and how we should group them. As they have a very similar logic behind them, it doesn’t make much sense to have different documentation pages for them. At the same time, having many functions on the same page will also lead to cluttered documentation and confuse users. Therefore, we decided to start with a fresh, blank page. We wanted to gather all functionalities that we want to have regarding error and residual plots, and then go forward. So, I created a new issue to gather our and community members’ ideas about these types of plots. Then, we will see which of those desired functionalities we already have implementations for and which of those need new implementations. Then, we will transfer everything to a new documentation page and make a fresh start for error and residual plots. Of course, this will take quite some time and certainly will extend beyond my GSoC time; however, I am happy that we are taking steps forward, and I’m glad that I’m a part of this journey. I would like to stay around and contribute when we do those transitions, but for now, I have to focus on other things as part of the programme. What are those going to be except rootograms? You will hear in the next blog post!

  1. Säilynoja et al. (2025). Recommendations for visual predictive checks in Bayesian workflow. [Online]. Available: https://arxiv.org/abs/2503.01509 ↩︎