def fpredict(self, L: list):
    '\n    ---------------------------------------------------------------------------\n    Computes the prediction.\n\n    Parameters\n    ----------\n    L: list\n        List containing the data. It must be a two-dimensional list containing \n        multiple rows. Each row must include as first element the ordered predictor\n        and as nth elements the nth - 1 exogenous variable (nth > 2). \n\n    Returns\n    -------\n    float\n        the prediction.\n        '

    def sub_arp(L: list):
        L_final = []
        for i in range(len(L)):
            result = L[(- i)]
            for i in range(len(self.coef_.values['coefficient'])):
                elem = self.coef_.values['predictor'][i]
                if (elem.lower() == 'intercept'):
                    result -= self.coef_.values['coefficient'][i]
                elif (elem.lower()[0:2] == 'ar'):
                    nb = int(elem[2:])
                    try:
                        result -= (self.coef_.values['coefficient'][i] * L[(- nb)])
                    except:
                        result = None
                L_final = ([result] + L_final)
        return L_final

    def fepsilon(L: list):
        if ((self.parameters['p'] > 0) or (self.parameters['P'] > 0)):
            L_tmp = sub_arp(L)
        else:
            L_tmp = L
        try:
            result = (L_tmp[(- 1)] - self.ma_avg_)
            for i in range(1, self.parameters['max_pik']):
                result -= (self.ma_piq_.values['coefficient'][i] * (L_tmp[(- i)] - self.ma_avg_))
            return result
        except:
            return 0
    if ((self.parameters['p'] == 0) and (self.parameters['q'] == 0) and (self.parameters['d'] == 0) and (self.parameters['s'] == 0) and (not self.exogenous)):
        return self.ma_avg_
    try:
        yt = [elem[0] for elem in L]
        yt_copy = [elem[0] for elem in L]
        yt.reverse()
        if (self.parameters['d'] > 0):
            for i in range(self.parameters['d']):
                yt = [(yt[(i - 1)] - yt[i]) for i in range(1, len(yt))]
        if ((self.parameters['D'] > 0) and (self.parameters['s'] > 0)):
            for i in range(self.parameters['D']):
                yt = [(yt[(i - self.parameters['s'])] - yt[i]) for i in range(self.parameters['s'], len(yt))]
        yt.reverse()
        (result, j) = (0, 1)
        for i in range(len(self.coef_.values['coefficient'])):
            elem = self.coef_.values['predictor'][i]
            if (elem.lower() == 'intercept'):
                result += self.coef_.values['coefficient'][i]
            elif (elem.lower()[0:2] == 'ar'):
                nb = int(elem[2:])
                result += (self.coef_.values['coefficient'][i] * yt[(- nb)])
            elif (elem.lower()[0:2] == 'ma'):
                nb = int(elem[2:])
                result += (self.coef_.values['coefficient'][i] * fepsilon(yt[:((- nb) - 1)]))
            else:
                result += (self.coef_.values['coefficient'][i] * L[(- 1)][j])
                j += 1
        for i in range(0, (self.parameters['d'] + 1)):
            for k in range(0, max(((self.parameters['D'] + 1) * min(1, self.parameters['s'])), 1)):
                if ((k, i) != (0, 0)):
                    comb_i_d = ((math.factorial(self.parameters['d']) / math.factorial((self.parameters['d'] - i))) / math.factorial(i))
                    comb_k_D = ((math.factorial(self.parameters['D']) / math.factorial((self.parameters['D'] - k))) / math.factorial(k))
                    result += (((((- 1) ** ((i + k) + 1)) * comb_i_d) * comb_k_D) * yt_copy[(- (i + (self.parameters['s'] * k)))])
        return result
    except:
        return None
---------------------------------------------------------------------------
Computes the prediction.

Parameters
----------
L: list
    List containing the data. It must be a two-dimensional list containing 
    multiple rows. Each row must include as first element the ordered predictor
    and as nth elements the nth - 1 exogenous variable (nth > 2). 

Returns
-------
float
    the prediction.
def fpredict(self, L: list):
    '\n    ---------------------------------------------------------------------------\n    Computes the prediction.\n\n    Parameters\n    ----------\n    L: list\n        List containing the data. It must be a two-dimensional list containing \n        multiple rows. Each row must include as first element the ordered predictor\n        and as nth elements the nth - 1 exogenous variable (nth > 2). \n\n    Returns\n    -------\n    float\n        the prediction.\n        '

    def sub_arp(L: list):
        L_final = []
        for i in range(len(L)):
            result = L[(- i)]
            for i in range(len(self.coef_.values['coefficient'])):
                elem = self.coef_.values['predictor'][i]
                if (elem.lower() == 'intercept'):
                    result -= self.coef_.values['coefficient'][i]
                elif (elem.lower()[0:2] == 'ar'):
                    nb = int(elem[2:])
                    try:
                        result -= (self.coef_.values['coefficient'][i] * L[(- nb)])
                    except:
                        result = None
                L_final = ([result] + L_final)
        return L_final

    def fepsilon(L: list):
        if ((self.parameters['p'] > 0) or (self.parameters['P'] > 0)):
            L_tmp = sub_arp(L)
        else:
            L_tmp = L
        try:
            result = (L_tmp[(- 1)] - self.ma_avg_)
            for i in range(1, self.parameters['max_pik']):
                result -= (self.ma_piq_.values['coefficient'][i] * (L_tmp[(- i)] - self.ma_avg_))
            return result
        except:
            return 0
    if ((self.parameters['p'] == 0) and (self.parameters['q'] == 0) and (self.parameters['d'] == 0) and (self.parameters['s'] == 0) and (not self.exogenous)):
        return self.ma_avg_
    try:
        yt = [elem[0] for elem in L]
        yt_copy = [elem[0] for elem in L]
        yt.reverse()
        if (self.parameters['d'] > 0):
            for i in range(self.parameters['d']):
                yt = [(yt[(i - 1)] - yt[i]) for i in range(1, len(yt))]
        if ((self.parameters['D'] > 0) and (self.parameters['s'] > 0)):
            for i in range(self.parameters['D']):
                yt = [(yt[(i - self.parameters['s'])] - yt[i]) for i in range(self.parameters['s'], len(yt))]
        yt.reverse()
        (result, j) = (0, 1)
        for i in range(len(self.coef_.values['coefficient'])):
            elem = self.coef_.values['predictor'][i]
            if (elem.lower() == 'intercept'):
                result += self.coef_.values['coefficient'][i]
            elif (elem.lower()[0:2] == 'ar'):
                nb = int(elem[2:])
                result += (self.coef_.values['coefficient'][i] * yt[(- nb)])
            elif (elem.lower()[0:2] == 'ma'):
                nb = int(elem[2:])
                result += (self.coef_.values['coefficient'][i] * fepsilon(yt[:((- nb) - 1)]))
            else:
                result += (self.coef_.values['coefficient'][i] * L[(- 1)][j])
                j += 1
        for i in range(0, (self.parameters['d'] + 1)):
            for k in range(0, max(((self.parameters['D'] + 1) * min(1, self.parameters['s'])), 1)):
                if ((k, i) != (0, 0)):
                    comb_i_d = ((math.factorial(self.parameters['d']) / math.factorial((self.parameters['d'] - i))) / math.factorial(i))
                    comb_k_D = ((math.factorial(self.parameters['D']) / math.factorial((self.parameters['D'] - k))) / math.factorial(k))
                    result += (((((- 1) ** ((i + k) + 1)) * comb_i_d) * comb_k_D) * yt_copy[(- (i + (self.parameters['s'] * k)))])
        return result
    except:
        return None