Right now I see that you have linear and 2nd-order polynomials, but it might be nice to support arbitrary order.
In case it is of interest, I have a reasonably fast implementation of arbitrary-order arbitrary-dimensionality Chebyshev interpolation/fitting supporting multiple outputs and differentiation at https://github.com/stevengj/FastChebInterp.jl (currently unregistered). (We originally used https://github.com/RJDennis/ChebyshevApprox.jl, but it wasn't fast enough for our purposes, and ApproxFun.jl isn't aimed at high-dimensional surrogates.)
(It can either do Chebyshev interpolation, for functions sampled at Chebyshev points, or Chebyshev least-square fitting from arbitrary points.)
Right now I see that you have linear and 2nd-order polynomials, but it might be nice to support arbitrary order.
In case it is of interest, I have a reasonably fast implementation of arbitrary-order arbitrary-dimensionality Chebyshev interpolation/fitting supporting multiple outputs and differentiation at https://github.com/stevengj/FastChebInterp.jl (currently unregistered). (We originally used https://github.com/RJDennis/ChebyshevApprox.jl, but it wasn't fast enough for our purposes, and ApproxFun.jl isn't aimed at high-dimensional surrogates.)
(It can either do Chebyshev interpolation, for functions sampled at Chebyshev points, or Chebyshev least-square fitting from arbitrary points.)