Interface for monomial evaluation in MultivariatePolynomialABC
Resurrecting this old question from @MrMinimal64 (#20) but as a more general issue for all polynomials.
While discussing the regression submodule with @wicaks72, we realized that the regression problem can in general be solved in any basis (although Lagrange is ideal for most cases). For this, we only have to construct the regression_matrix
in the respective basis. regression_matrix
is the matrix formed by Monomial evaluations on a given set of points. It would be easier to generalize this construction if the MultivariatePolynomialABC has the following function implemented:
def evaluate_monomials(self, pts : np.ndarray) -> np.ndarray:
"""Evaluates each of the monomial on each of the points in pts."""
pass
Maybe this function will also be useful in other contexts. What do you think @hernan68 ?