rc.task.regressions§

Functionality for linear regression

Methods§

gls(X, y, cov_y[, is_through_origin])

Generalized Least Squares linear regression.

Module Contents§

gls(X, y, cov_y, is_through_origin=False)§

Generalized Least Squares linear regression.

Parameters:
  • X (NP.Matrix) – An (N,M) matrix of regression variables

  • y (NP.Matrix) – An (N,1) vector of observations.

  • cov_y (NP.Matrix) – The (N,N) covariance matrix of observations y.

  • is_through_origin (bool) – True to constrain to y(0)=0

Return type:

rc.base.definitions.Tuple[TF.Vector, TF.Matrix]

Returns: A pair consisting of the (M+1,1) – or (M,1) if is_through_origin – regression coefficients and their covariance matrix,

where the intercept is the first regression coefficient – or absent if is_through_origin.