Sparse interpolation

Sparse interpolation

using TensorDec

A sparse polynomial in 3 variables

X = @ring x1 x2 x3
f = 6.7x1^4*x2^5*x3 + 10.2x1^2*x2*x3^3 - 3.4x1*x2^2*x3

6.7x1^{4}x2^{5}x3 + 10.2x1^{2}x2x3^{3} - 3.4x1x2^{2}x3

The series of moments $f(\zeta^{\alpha})$ for $|\alpha|\leq 3$.

zeta = fill(0.9, length(X))
sigma = series(f, zeta, X,3)
7.2252810000000025dx1*dx3 + 10.382283000000001dx2 + 10.405800000000001dx3 + 7.5529172763000005dx1*dx2 + 6.357388987800002dx3^3 + 6.117862993803001dx2^2dx3 + 4.834376094422702dx1^3 + 7.008371185034148dx2^3 + 7.774274700000001dx2*dx3 + 5.495308104980432dx1^2dx2 + 5.5261037486700015dx1*dx2*dx3 + 6.8223503070000024dx1^2 + 8.0936982dx3^2 + 9.59787dx1 + 8.36740554867dx2^2 + 4.995745656300002dx1^2dx3 + 5.472820242000001dx1*dx3^2 + 6.217299094482389dx1*dx2^2 + 5.852477610000002dx2*dx3^2 + 13.499999999999998

Computing its decomposition using svd

w, Xi = decompose(sigma);

yields the coefficients of the terms of f as the weights $\omega$, and the exponents of the monomials of f as the $\log_{\zeta}$ of the points $\Xi$:

w
3-element Array{Float64,1}:
 -3.399999999998614
 10.199999999997454
  6.700000000001163
Ex = log(Xi, zeta)
3×3 Array{Float64,2}:
 1.0  2.0  4.0
 2.0  1.0  5.0
 1.0  3.0  1.0