Multiple regression

From Rosetta Code
Revision as of 16:47, 29 June 2009 by rosettacode>Rob.s.brit (New page: Given a set of data vectors in the following format: <math>y = \{ y_1, y_2, ..., y_n \}</math> <math>x_i = \{ x_{i1}, x_{i2}, ..., x_{in} \}, i \in 1..k</math> Compute the vector <math>...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Given a set of data vectors in the following format:

Compute the vector using ordinary least squares regression using the following equation:

You can assume y is given to you as an array, and x is given to you as a two-dimensional array.