- sushie.utils.ols(X: Array | ndarray | bool | number | bool | int | float | complex, y: Array | ndarray | bool | number | bool | int | float | complex) Tuple[Array, Array, Array] [source]
Perform ordinary linear regression using QR Factorization.
- Parameters:
- X: Array | ndarray | bool | number | bool | int | float | complex¶
\(n \times p\) matrix for independent variables with no intercept vector.
- y: Array | ndarray | bool | number | bool | int | float | complex¶
\(n \times m\) matrix for dependent variables. If \(m > 1\), then perform \(m\) ordinary regression in parallel.
- Returns:
- A tuple of
contains residuals (
Array
),adjusted \(r^2\) (
Array
) for of the regression,\(p\) values (
Array
) for the coefficients.
- Return type:
Tuple[Array, Array, Array]
Last update:
Oct 27, 2024