glmdenoise.utils.get_poly_matrix module

glmdenoise.utils.get_poly_matrix.constructpolynomialmatrix(n, degrees)[source]

Calculates a matrix of polynomials used to regress them out of your data

Parameters:
  • n (int) – number of points
  • degrees (array) – vector of polynomial degrees
Returns:

array of n x len(degrees)

Return type:

array

glmdenoise.utils.get_poly_matrix.projectionmatrix(X)[source]

Calculates a projection matrix

Parameters:X (array) – design matrix
Returns:Projection matrix size of X.shape[0] x X.shape[0]
Return type:array