Пример #1
0
def pmd_univariate(y: Y_TYPE,
                   s: dict,
                   k: int = 1,
                   a: A_TYPE = None,
                   t: T_TYPE = None,
                   e: E_TYPE = None):
    """ Uses only y[0] and ignores y[1:] and a[:] """
    y0 = [wrap(y)[0]]
    return pmd_skater_factory(y=y0, s=s, k=k, a=None, t=t, e=e, method='auto')
Пример #2
0
def pmd_known(y: Y_TYPE,
              s: dict,
              k: int = 1,
              a: A_TYPE = None,
              t: T_TYPE = None,
              e: E_TYPE = None):
    """ Uses known-in-advance but not y[1:] """
    y0 = [wrap(y)[0]]
    return pmd_skater_factory(y=y0, s=s, k=k, a=a, t=t, e=e, method='auto')
Пример #3
0
def pmd_exogenous(y: Y_TYPE,
                  s: dict,
                  k: int = 1,
                  a: A_TYPE = None,
                  t: T_TYPE = None,
                  e: E_TYPE = None):
    """ Predict using auto_arima, with both simultaneously observed and known in advance variables
        This skater has no hyper-parameters

        y: Y_TYPE    scalar or list where y[1:] are interpreted as contemporaneously observed exogenous variables
        s:           state
        k:           Number of steps ahead to predict
        a:           (optional) scalar or list of variables known k-steps in advance.
                      (IMPORTANT: If supplying 'a', provide the known variable k steps ahead, not the contemporaneous one !).
        t:           (optional) Time of observation.
        e:           (optional) Maximum computation time (supply e>60 to give hint to do fitting)

        :returns: x [float] , s', scale [float]
    """
    return pmd_skater_factory(y=y, s=s, k=k, a=a, t=t, e=e, method='auto')