OSOceanAcoustics / echopop

Generating biological estimates for animal "pop"ulation from echosounder data
https://echopop.readthedocs.io/
Apache License 2.0
1 stars 4 forks source link

Implementation of the augmented ordinary kriging algorithm #187

Closed brandynlucca closed 5 months ago

brandynlucca commented 8 months ago

In the updated working branch, kriging model parameters are stored within the Survey object when the *.xlsx parameter file is initially loaded.

https://github.com/uw-echospace/EchoPro/blob/2157de885498f6b6d951ccee85ed7a6dfb8818ba/EchoPro/survey.py#L174-L184

These values are combined with the configuration settings so they are stored in the same location. The configuration settings are assigned below, for reference.

https://github.com/uw-echospace/EchoPro/blob/2157de885498f6b6d951ccee85ed7a6dfb8818ba/config_files/initialization_config.yml#L46-L55

Once the semivariogram has been fully parameterized (related to #186), it is then incorporated into the kriging interpolation algorithm to compute the kriging/covariance matrix and calculating the theoretical variogram at specific lag distances depending on the number of values within the search radius. The actual kriging occurs within the ordinary_kriging(...) function; however, there are some modifications to the interpolation procedure that Chu explained to us during our meeting with him. This specifically concerns the adaptive search window that is built into the algorithm that maintains a set number of neighboring spatial points (defaults: kmin=3, kmax=10), and therefore lag distance values, that the theoretical semivariogram is calculated over (note that the model parameterization remains the same; it is only the distance lags it is computed over that changes).

https://github.com/uw-echospace/EchoPro/blob/2157de885498f6b6d951ccee85ed7a6dfb8818ba/EchoPro/computation/kriging_methods.py#L117-L189

Other kriging models available in the Matlab Kriging library (i.e. universal kriging with linear drift, objective mapping) are not implemented here, so only this modified ordinary kriging algorithm has been incorporated.

Questions for FEAT

  1. Are any of the other kriging algorithms used or considered? Or is just having ordinary kriging sufficient?
  2. Are the areal biomass densities the only variables kriged? Or would it be helpful to enable the software to krige other variables?
  3. Are there any summary statistics that are directly derived from the kriged values aside from the summed biomass? Or is the Jolly and Hampton (1990) algorithm always applied to estimate the coefficient of variation (CV; related to #185)?
  4. Are the kriging parameters ever manually defined? Or are they always contained within the configuration and initial data files?
  5. Related to Q4: would it be helpful to be able to manually adjust some of these settings?

To Do

brandynlucca commented 5 months ago

A more in-depth review of the EchoPro MATLAB code has informed the updated implementation of the kriging algorithm incorporated into PR #241. This uses the same algorithm as the original MATLAB code that is vectorized and utilizes the same adaptive search radius and extrapolation penalty.

This can be closed when PR #241 is merged.