in svinfer/linear_model/linear_regression.py [0:0]
def __init__(self, n, xtx, xty, yty, x_s2, df_corrected=True):
if xtx.shape[0] != xtx.shape[1]:
raise ValueError("xtx should be square matrix!")
if xtx.shape[0] != xty.shape[0]:
raise ValueError("xtx and xty have unmatched dimension")
if any(s2 < 0.0 for s2 in x_s2):
raise ValueError("x_s2 should not contain negative elements")
self.n = n
self.xtx = xtx
self.xty = xty
self.yty = yty
self.x_s2 = x_s2
self.df_corrected = df_corrected
self.k = self.xtx.shape[0]
self.beta = None
self.sigma_sq = None
self.omega = None