residuals#

ctapipe.fitting.residuals(X, y, beta)[source]#

Calculate the residuals of a linear regression.

Parameters:
X: np.array

Design matrix of shape (N, 2), as created by ~ctapipe.fitting.design_matrix

y: np.array

y values

beta: np.array

Parameter vector of the linear regression