new constructor(x: any, y: any, M: any)
Parameters
x (any) : Independent variable
y (any) : Dependent variable
M (any)

Constructor for the 2D polynomial fitting

new constructor(inputs: any, outputs: any, options: any)
Parameters
inputs (any)
outputs (any)
options (any = {})

Function that fits the model given the data(X) and predictions(y). The third argument is an object with the following options:

  • order: order of the polynomial to fit.
train(X: Matrix, y: Matrix)
Parameters
X (Matrix) A matrix with n rows and 2 columns.
y (Matrix) A vector of the prediction values.

Function that given a column vector return this: vector^power

powColVector(x: any, power: any): (Suite | Matrix)
Parameters
x (any) Column vector.
power (any) Pow number.
Returns
(Suite | Matrix):