def

func:matrixFitLinearRegression

matrixFitLinearRegression(y, x)

Given a matrix of y coordinates and a matrix of multiple x coordinates compute the best fit multiple linear regression equation using the ordinary least squares method. Both y and x may be any value accepted by toMatrix().

The resulting linear equation for r X coordinates is:

yᵢ = bias + b₁xᵢ₁ + b₂xᵢ₂ +...+ bᵣxᵢᵣ

The equation is returned as a grid. The grid meta:

  • bias: bias or zero coefficient which is independent of any of the x factors
  • r2: R² coefficient of determination as a number between 1.0 (perfect correlation) and 0.0 (no correlation)
  • r: the square root of R², referred to as the correlation coefficient
  • rowCount: the number of rows of data used in the correlation For each X factor there is a row with the following tags:
  • b: the correlation coefficient for the given X factor

meta

supertypes

feature

Feature namespace of definitions formatted as feature:name

    func

Axon function