pyKriging icon indicating copy to clipboard operation
pyKriging copied to clipboard

Optimizer of krige and regressionkrige

Open HawkQ opened this issue 3 years ago • 1 comments

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) `

HawkQ avatar Jul 21 '21 03:07 HawkQ

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.

capaulson avatar Nov 28 '21 05:11 capaulson