# Degree modification of multivariate polynomial chaos surrogate model

Hello,

I am using `Surrogate.jl` to build my polynomial choas surrogate model. The model is multivariate, with 4 input parameters, and 1D output. I want to change the parameter `op = SurrogatesPolyChaos.GaussOrthoPoly(5)` of the model, but I got an error message. What’s the suitable form for multivariate polynomial chaos model?

``````using Surrogates
using SurrogatesPolyChaos
using Plots
default()
function f(x)
t = x
w = x
L = 100.0
E = 2.770674127819261e7
X = 530.8038576066307
Y = 997.8714938733949
return (4*L^3)/(E*w*t)*sqrt( (Y/t^2)^2 + (X/w^2)^2)
end

n = 100
lb = [1.0,1.0]
ub = [8.0,8.0]
xys = sample(n,lb,ub,SobolSample());
zs = f.(xys);
x, y = 0:8, 0:8
p1 = surface(x, y, (x1,x2) -> f((x1,x2)))
xs = [xy for xy in xys]
ys = [xy for xy in xys]
p2 = contour(x, y, (x1,x2) -> f((x1,x2)))
scatter!(xs, ys)
plot(p1, p2, title="True function")

mypoly = PolynomialChaosSurrogate(xys, zs,  lb, ub, op = SurrogatesPolyChaos.GaussOrthoPoly(5))
``````
``````TypeError: in keyword argument op, expected PolyChaos.MultiOrthoPoly, got a value of type PolyChaos.GaussOrthoPoly{Vector{Float64}, PolyChaos.GaussMeasure, PolyChaos.Quad{Float64, Vector{Float64}}}
``````

Can you open an issue?

I have opened a new issue in github Degree modification of multivariate polynomial chaos surrogate model · Issue #378 · SciML/Surrogates.jl · GitHub