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

Prediction with multiple inputs #34

Open
mill1016 opened this issue Feb 19, 2019 · 4 comments
Open

Prediction with multiple inputs #34

mill1016 opened this issue Feb 19, 2019 · 4 comments

Comments

@mill1016
Copy link

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.

@haomjc
Copy link

haomjc commented Mar 13, 2019

i have met the same problem,i used loop,the algorithm runs slowly because of it.

@lumedee007
Copy link

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

@capaulson
Copy link
Owner

@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.

@trivediashutosh
Copy link

can anyone share how to use CoKriging using this package?

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

5 participants