def fit(self, X, y):
    refit = True
    for t in range(len(self.coefs)):
        if (self.s_eps == 0):
            break
        if (abs((self.coefs[t][0] - y[(- 1)])) <= self.s_eps):
            self.beta = self.coefs[t][1].copy()
            refit = False
            break
    if refit:
        self.beta = self.model.fit(X, y)
        if (self.s_eps != 0):
            self.coefs += [[y[(- 1)], self.beta.copy()]]
def fit(self, X, y):
    refit = True
    for t in range(len(self.coefs)):
        if (self.s_eps == 0):
            break
        if (abs((self.coefs[t][0] - y[(- 1)])) <= self.s_eps):
            self.beta = self.coefs[t][1].copy()
            refit = False
            break
    if refit:
        self.beta = self.model.fit(X, y)
        if (self.s_eps != 0):
            self.coefs += [[y[(- 1)], self.beta.copy()]]