Skip to content

Degree modification of multivariate polynomial chaos surrogate model  #378

@chenr86

Description

@chenr86

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? Can I specify the degree of the polynomial basis greater than 2 for multivariate model?

Below is an example and the error message.

using Surrogates
using SurrogatesPolyChaos
using Plots
default()
function f(x)
    t = x[1]
    w = x[2]
    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[1] for xy in xys]
ys = [xy[2] 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}}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions