mmaelicke / scikit-gstat

Geostatistical variogram estimation expansion in the scipy style
https://mmaelicke.github.io/scikit-gstat/
MIT License
224 stars 52 forks source link

SpaceTimeVariogram bit messed up #93

Open mmaelicke opened 3 years ago

mmaelicke commented 3 years ago

During the last two minor versions, we messed the SpaceTimeVariogram up. Dynamically updating parameters is not working properly anymore, the docs are way outdated and the differentiation which parameters are stored in the SpaceTimeVariogram and which are stored in the Marginals is weird and incosistend.

This is the main reminder for me to refactor the SpaceTimeVariogram until 0.6.0 is released.

redhog commented 3 years ago

The SpaceTime Variogram also does NOT take advantage of sparse matrices :( I couldn't get it to work quickly, so just hard-coded it to not use the max_dist flag to the MetricSpace...

danchurch commented 1 year ago

Hi there, thanks for your very useful package. Concerning this issue, has the documentation for the spacetimevariogram class been updated? I can't find a good example for constructing a spacetimevariogram object, especially concerning how to format the time data.

mmaelicke commented 1 year ago

Hi, no unfortunately, it was not yet updated. I'll take this as another comment and reminder to do this somewhere near in the future. Concerning the data: The coordinates are passed just like for the other variogram classes. Unlike array, In SciKit-GStat, the time axis is not considered a coordinate axis, so only the spatial coordinates are considered here. The values are then a 2D matrix instead of a 1D array. The shape is (sample_size, n_timesteps). Thus, the rows of coordinates and values need to match. In case you are coming from pandas/polars etc. and you are using a DatetimeIndex, you need to transpose the data, before you pass it to the SpaceTimeVariogram.

Sorry, it's still not updated. I hope to find some time soon.

danchurch commented 1 year ago

No need for apologies. I am trying to use features you haven't fully developed yet. I'm grateful you have put this package out there and are maintaining it.