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

Optimizer of krige and regressionkrige #43

Open
HawkQ opened this issue Jul 21, 2021 · 1 comment
Open

Optimizer of krige and regressionkrige #43

HawkQ opened this issue Jul 21, 2021 · 1 comment

Comments

@HawkQ
Copy link

HawkQ commented Jul 21, 2021

Hi. I noticed that both krige and regressionkrige can choose optimizer. Both PSO and GA works fine in my code when using krige. But when using regressionkrige, GA and no optimizer can give a good result while PSO always give me a result with big difference from GA.

Here is the code using regressionkriging and pso, it's just a simple try. The precise value of d should be 90, when using pso, the value can be numbers like 175, or -1735, etc.

dataA.txt
dataB.txt

`
import pyKriging
import numpy as np
from pyKriging.regressionkrige import regression_kriging

a = np.loadtxt('dataA.txt', dtype = np.float32)
b = np.loadtxt('dataB.txt', dtype = np.float32)

c = regression_kriging(a, b)
c.train('pso')
d = c.predict([9, 3])
print(d)
`

@capaulson
Copy link
Owner

Interesting. The difference between kris and regressionkrige is the addition of one parameter that allows the model to deviate from observed points. I'll take a look at the data to see what's happening.

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

No branches or pull requests

2 participants