Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gaussian Processes with Variogram vs Covariance #404

Closed
markmbaum opened this issue Mar 8, 2024 · 4 comments · Fixed by JuliaEarth/GeoStatsFunctions.jl#4
Closed

Gaussian Processes with Variogram vs Covariance #404

markmbaum opened this issue Mar 8, 2024 · 4 comments · Fixed by JuliaEarth/GeoStatsFunctions.jl#4

Comments

@markmbaum
Copy link

I noticed that simulating random fields from a GaussianVariogram works but using a GaussianCovariance does not.

For example, after

using Meshes, GeoStatsFunctions, GeoStatsProcesses

The following works fine

field = rand(
    GaussianVariogram() |> GaussianProcess,
    CartesianGrid(10, 10),
    :x => Float64,
)

but using a Covariance does not

field = rand(
    GaussianCovariance() |> GaussianProcess,
    CartesianGrid(10, 10),
    :x => Float64,
)

and produces this error

ERROR: ArgumentError: Cannot construct range from arguments:
start = GaussianCovariance(sill: 1.0, nugget: 0.0, range: 1.0, distance: Euclidean)
step = nothing
stop = nothing
length = nothing
Try specifying more arguments.

This is with

  [aa102bde] GeoStatsProcesses v0.5.8
  [6771c435] GeoStatsFunctions v0.2.1
  [eacbb407] Meshes v0.40.12
@juliohm
Copy link
Member

juliohm commented Mar 8, 2024

I can reproduce the issue. This is because the Covariance counterparts were added recently for convenience, but no one went ahead and added the necessary methods as in the Variogram types.

Would you like to add the missing methods in GeoStatsFunctions.jl?

@markmbaum
Copy link
Author

Yes I can get to it, feel free to assign me.

I've been appreciating the Covariance types, by the way.

@juliohm
Copy link
Member

juliohm commented Mar 19, 2024

Hi @markmbaum did you have a chance to take a look into this?

@markmbaum
Copy link
Author

Yes sorry for the delay, planning to do it soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants