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

Number of parameters can be handled by KPLSK #565

Closed
Val4on opened this issue May 17, 2024 · 3 comments
Closed

Number of parameters can be handled by KPLSK #565

Val4on opened this issue May 17, 2024 · 3 comments

Comments

@Val4on
Copy link

Val4on commented May 17, 2024

Hi, how many parameters can be handled by KPLSK? I have a test case which has 100 parameters, but it's asking for 4096 points to build a model, how can I reduce number of points required for DOE?

@relf
Copy link
Member

relf commented May 22, 2024

Hi, I am not sure to understand... Your training input data is an array of shape (4096, 100) ? Do you have an error by applying KPLSK ?

@NatOnera
Copy link
Contributor

NatOnera commented May 23, 2024

Hi, I tried to train KPLSK with a DOE (500, 100) and everything seams fine. Here is the few lines of code. Only the training time is quite long.

import numpy as np

from smt.surrogate_models import KPLSK
from smt.sampling_methods import LHS
from smt.problems import LpNorm

dim = 100
problem = LpNorm(ndim=dim)

xlimits = problem.xlimits
sampling = LHS(xlimits=xlimits)

num = 500
xt = sampling(num)
yt=problem(xt)

sm = KPLSK(theta0=[1e-2])
sm.set_training_values(xt, yt)
sm.train()
print('training done')
#to have test data
num=1000
xtest = sampling(num)
ytest=problem(xtest)
ypred=sm.predict_values(xtest)
plt.plot(ytest, ypred , "o")

@NatOnera
Copy link
Contributor

NatOnera commented May 23, 2024

To reduce training time, a possibility is to use GPX (with or without dimension reduction )

sm = GPX(theta0=[1e-2])
sm = GPX(theta0=[1e-2], kpls_dim=50)

@relf relf closed this as completed Jun 10, 2024
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

3 participants