mmaelicke/scikit-gstat: A scipy flavoured geostatistical variogram analysis toolbox
Helge David Schneider
SciKit-Gstat is a scipy-styled analysis module for geostatistics. It includes two base classes Variogram and OrdinaryKriging. Additionally, various variogram classes inheriting from Variogram are available for solving directional or space-time related tasks. The module makes use of a rich selection of semi-variance estimators and variogram model functions while being extensible at the same time.
There is one potetial breaking change compared to version 0.3.0: The lag_classes generator now yields empty arrays for unoccupied lag classes. This will result in NaN values for the semi-variance.
Changes since 0.3
[binning] added stable_entropyoption that will optimize the lag class edges to be of comparable Shannon Entropy.
[Variogram] A new method is introduced to calculate fitting weights. Works for all but the manual fit method. By setting fit_sigma='entropy', the fitting weights will be adjusted according to the lag classes' Shannon entropy. That will ignore lag classes of high uncertainty and emphasize lags of low uncertainty.
[binning] added a median aggregation option to ward. This can be enabled by setting binning_agg_func='median'. The cluster centroids will be derived from the members median value, instead of mean value.
[Variogram] added fit_method='ml' - a maximum likelihood fitting procedure to fit the theoretical variogram to the experimental
[Variogram] added fit_method='manual'. This is a manual fitting method that takes the variogram parameters either at instantiation prefixed by fit_, or as keyword arguments by fit.
[Variogram] the manual fitting method will preseve the previous parameters, if the Variogram was fitted before and the fitting parameters are not manually overwritten.
[binning] added kmeans and ward for forming non-equidistant lag classes based on a distance matrix clustering
[Kriging] Kriging now stores the last interpolated field as z. This is the first of a few changes in future releases, which will ultimately add some plotting methods to Kriging.
[plotting] minor bugfixes in plotting routines (wrong arguments, pltting issues)
[docs] added a tutorial about plotting
[binning] added auto_derived_lags for a variety of different methods that find a good estimate for either the number of lag classes or the lag class width. These can be used by passing the method name as bin_func parameter: Freedman-Diaconis ('fd'), Sturge's rule ('sturges'), Scott's rule ('scott') and Doane's extension to Sturge's rule ('doane'). Uses histogram_bin_edges <numpy.histogram_bin_edges> internally.
[Variogram] now accepts arbitary kwargs. These can be used to further specify functional behavior of the class. As of Version 0.3.7 this is used to pass arguments down to the entropy and percentile estimators.
[Variogram] the describe now adds the init arguments by default to the output. The method can output the init params as a nested dict inside the output or flatten the output dict.
[Variogram] some internal code cleanup. Removed some unnecessary loops
[Variogram] setting the n_lags property now correctly forces a recalculation of the lag groupings. So far they were kept untouches, which might result in old experimental variogram values for the changed instance. This is a potential breaking change.
[Variogram] The lag_classes generator now yields empty arrays for unoccupied lag classes. This will result in NaN values for the semi-variance. This is actually a bug-fix. This is a potential breaking change
[plotting] The location_trend can now add trend model lines to the scatter plot for the 'plotly' backend and calculate the R² for the trend model.
[Variogram] the internal attribute holding the name of the current distance function was renamed from _dict_func to _dist_func_name
[plotting] The scattergram functions color the plotted points with respect to the lag bin they are originating from. For matplotlib, this coloring is suppressed, but can activated by passing the argument scattergram(single_color=False).
[plotting] a new submodule is introduced: skgstat.plotting. This contains all plotting functions. The plotting behavior is not changed, but using skgstat.plotting.backend(), the used plotting library can be switched from matplotlib to plotly
[stmodels] some code cleanup
[SpaceTimeVariogram] finally can fit the product-sum model to the experimental variogram
[models] Matérn model now adapts effective range to smoothness parameter
[models] Matérn model documentation updated
[models] some minor updates to references in the docs
[Variogram] - internal distance calculations were refactored, to speed things up
[Kriging] - internal distance calculations were refactored, to speed things up