Model for performing multivariate polynomial regression.

Train the model by using fit. Afterwards inference is possible via predict.

The model is implemented as a pipe consisting of two steps. First, the input is transformed by the class PolynomialFeatures. This reduces the problem to a linear regression problem. Hence in the second step we simply apply linear regression.

Constructors

  • Basic configuration. You can skip configuration by providing no arguments.

    In case no arguments are given you have to use the method fromConfig to set up a configuration in order to use the method fit.

    For the exact meaning of the arguments see the documentation of PolynomialFeatures.

    Parameters

    • Optionaldegree: number

      Highest order of the monomials

    • homogeneous: boolean = false

      Whether to include only highest order monomials

    • interactionOnly: boolean = false

      Whether to disallow higher powers of single features

    Returns PolynomialRegressor

Accessors

Methods

  • Trains the model.

    Parameters

    • x: number[][]

      List of input vectors.

    • y: number[][]

      List of corresponding desired output vectors.

    Returns void