def training_termination(self, valid_result):
    if (len(valid_result) > 5):
        if self.greater_is_better:
            if (valid_result[(- 1)] < valid_result[(- 2)] < valid_result[(- 3)] < valid_result[(- 4)] < valid_result[(- 5)]):
                return True
        elif (valid_result[(- 1)] > valid_result[(- 2)] > valid_result[(- 3)] > valid_result[(- 4)] > valid_result[(- 5)]):
            return True
    return False
def training_termination(self, valid_result):
    if (len(valid_result) > 5):
        if self.greater_is_better:
            if (valid_result[(- 1)] < valid_result[(- 2)] < valid_result[(- 3)] < valid_result[(- 4)] < valid_result[(- 5)]):
                return True
        elif (valid_result[(- 1)] > valid_result[(- 2)] > valid_result[(- 3)] > valid_result[(- 4)] > valid_result[(- 5)]):
            return True
    return False