pyKriging
pyKriging copied to clipboard
Optimizer of krige and regressionkrige
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.
` 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) `
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.