Prediction with multiple inputs
Hello, let's say I have set-up and trained my model,
k = kriging(np.array(X),np.array(y)) k.train(optimizer=optimizer)
where X has 50rows and 13 columns.
I now want to use it to predict new outputs, where the input vector, X_new, is 100 x 12 (list, array, dataframe, ??). Is there a way to predice all 100 rows at the same time or do we need to loop.
I can't get this to work, but would like it too prediction = k.predict(X_new)
Any suggestions?
Thanks.
i have met the same problem,i used loop,the algorithm runs slowly because of it.
I had the same issue, I used loop too. I think the speed of the algorithm depends on the training data. It takes little time to predict but quite a while to train using over 100 input data
@mill1016 @haomjc can you share more details about the error? That should work, if your array is correct. See the plotting function in krige.py for an example of predicting many points in one prediction call.
@lumedee007 You're correct, training takes a long time relative to predictions. Two hyperparameters are created for every dimension you add. These parameters are tuned during fitting. pyKriging uses a blend of global optimization and local optimization to best tune these parameters. Given the complexity of this problem, traning can take some time. Once the most optimal hyperparameters are found, predictions become some simple matrix calculations. This makes prediction very fast.
can anyone share how to use CoKriging using this package?