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

n-dimensional Kriging #41

Open
Vincy-xiao opened this issue Mar 30, 2021 · 1 comment
Open

n-dimensional Kriging #41

Vincy-xiao opened this issue Mar 30, 2021 · 1 comment

Comments

@Vincy-xiao
Copy link

Hi, I am using pyKriging to train a set of input(100 rows and 3 columns) and output(100 rows and 400 columns) data, but it shows that there is a problem: index 1 is out of bounds for axis 0 with size 1.
Below is the simple code I wrote:

import math
import random
import numpy as np
import matplotlib.pyplot as plt
from pyKriging.krige import kriging
import scipy.io as scio

path_1 = 'hb114_00_bywz.mat'
data_1 = scio.loadmat(path_1)

X = data_1['params'] #100 rows and 3 columns
Y = data_1['Cp_M'] #100 rows and 400 columns
X = np.mat(X)
Y = np.mat(Y)
k0 = kriging(X, Y)
k0.train()
a = [0.1065, 0.062, 0.353]
YX = k0.predict(a)

These codes can't run, hope to get help, thanks in advance.

@capaulson
Copy link
Owner

There should only be one column in Y. If you have 400 columns in Y, you would need 400 models to predict each column.

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