Sparse interpolation

using PolyExp

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^4x2^5x3 + 10.2x1^2x2*x3^3 + -3.4x1*x2^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)
13.499999999999998 + 9.597870000000002dx1 + 10.382283000000001dx2 + 10.405800000000001dx3 + 6.8223503070000024dx1^2 + 7.552917276300002dx1*dx2 + 7.2252810000000025dx1*dx3 + 8.36740554867dx2^2 + 7.774274700000001dx2*dx3 + 8.093698200000002dx3^2 + 4.834376094422702dx1^3 + 5.495308104980432dx1^2dx2 + 4.995745656300002dx1^2dx3 + 6.217299094482389dx1*dx2^2 + 5.5261037486700015dx1*dx2*dx3 + 5.472820242000003dx1*dx3^2 + 7.008371185034148dx2^3 + 6.117862993803001dx2^2dx3 + 5.852477610000002dx2*dx3^2 + 6.357388987800002dx3^3

Computing its decomposition using svd

w, Xi = svd_decompose(sigma);

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

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