Modelling the Uncertainty

The next step of my project is to fit a distribution to my GBIF data to allow me to sample an arbitrary number of occurrences. I considered skipping this step and just sampling directly from the empirical distribution; however, I've decided that sampling from a model will give me the flexibility to see how different models degrade/scale with the noisiness and density of the data.

To start, I took my categorisations of the different sources of uncertainty (GPS, grid squares and obscured) and separated out the data so I could model each of them independently. For the OS grid square and iNaturalist obscured uncertainties, the model is a standard discrete distribution. For the GPS uncertainties I've decided to model them as a Gaussian mixture model, as I think each device has roughly normally distributed error, with its own spread, so the overall GPS error is a mix of several Gaussians. These are fitted on log10 radii as the uncertainty spans multiple orders of magnitude. To find the right number of components I fit models with different numbers of components and calculated their BIC scores, which balance accuracy against complexity. However, I found that the score kept improving the more components I added.

bad_bic_scores

I immediately thought that this was a statistical modelling problem rather than a genuine feature of the data. My best guess for why this happens is that due to how a lot of the uncertainty points have been discretised, the GMM can get arbitrarily better by placing a component on one of the spikes and shrinking its standard deviation. The solution to this problem was to add a small amount of artificial noise to the data to spread each value back over the range it was probably rounded from (I'm assuming to the nearest metre), smoothing out the spikes. After doing this I rechecked how BIC scores varied with the number of components.

better_bic_scores

From this plot I deemed 3 to be the elbow and settled on that as the number of components in my model. I then tested this by sampling from the models for each mechanism and checking them against the empirical distribution, and I'm happy with how they turned out.

synthetic_comparison

Reading Corner: Dark Forest and Death's End

I've greatly enjoyed the Remembrance of Earth's Past series and it's reaffirmed my desire to read more science fiction this year. I had a fair few problems with it, which I've failed twice now to articulate concisely. Every time I sit down to write about my grievances, they spiral into vast essays that I'm self-aware enough to know no one wants to read. But if for some reason you are eager to hear my thoughts, feel free to bring it up with me in person and I'll tell you what I think about the character writing and what I saw as a pervasive undercurrent of misogyny in the series.