<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fit(self, p, x, y):
 """ fit the regression method and also Krige the residual Parameters p: ndarray (Ns, d) array of predictor variables (Ns samples, d dimensions) for regression x: ndarray ndarray of (x, y) points. Needs to be a (Ns, 2) array corresponding to the lon/lat, for example 2d regression kriging. array of Points, (x, y, z) pairs of shape (N, 3) for 3d kriging y: ndarray array of targets (Ns, ) """

        self.regression_model.fit(p, y)
        ml_pred = self.regression_model.predict(p)
        print('Finished learning regression model')
        # residual=y-ml_pred
        self.krige.fit(x=x, y=y - ml_pred)
        print('Finished kriging residuals')