

def __init__(self, x, y=None, kernel=kernel_rbf, scale=0.5, ridgecoeff=1e-10, **kwds):
    '\n        Parameters\n        ----------\n        x : 2d array (N,K)\n           data array of explanatory variables, columns represent variables\n           rows represent observations\n        y : 2d array (N,1) (optional)\n           endogenous variable that should be fitted or predicted\n           can alternatively be specified as parameter to fit method\n        kernel : function, default: kernel_rbf\n           kernel: (x1,x2)->kernel matrix is a function that takes as parameter\n           two column arrays and return the kernel or distance matrix\n        scale : float (optional)\n           smoothing parameter for the rbf kernel\n        ridgecoeff : float (optional)\n           coefficient that is multiplied with the identity matrix in the\n           ridge regression\n\n        Notes\n        -----\n        After initialization, kernel matrix is calculated and if y is given\n        as parameter then also the linear regression parameter and the\n        fitted or estimated y values, yest, are calculated. yest is available\n        as an attribute in this case.\n\n        Both scale and the ridge coefficient smooth the fitted curve.\n\n        '
    self.x = x
    self.kernel = kernel
    self.scale = scale
    self.ridgecoeff = ridgecoeff
    self.distxsample = kernel(x, x, scale=scale)
    self.Kinv = np.linalg.inv((self.distxsample + (np.eye(*self.distxsample.shape) * ridgecoeff)))
    if (not (y is None)):
        self.y = y
        self.yest = self.fit(y)

dataset/ETHPy150Open statsmodels/statsmodels/statsmodels/sandbox/regression/kernridgeregress_class.py GaussProcess.__init__/original