Example #1
0
def tests_enumerate():
   'Return a list of possible contexts.'
   tests = list()
   for (ob, ob_truth) in g.truth.items():
      for tr in args.trainings:
         for ho in args.horizons:
            for i in forecast.nows(len(ob_truth), tr, ho, args.teststride):
               tests.append(forecast.Context(ob_truth, ob, tr, ho, i,
                                             minfinite=0.8, minrows=8))
   return tests
Example #2
0
def tests_enumerate():
   'Return an iterable of possible contexts, given args and truth.'
   tests = list()
   truedata_ct = len(next(truth.items())[1])
   for tr in args.training:
      for ho in args.horizon:
         # Eenumerate every possible now with sufficient time before for the
         # training period and sufficient time after for at least one test.
         for i in forecast.nows(truedata_ct, tr, ho, args.teststride):
            for (obk, truedata) in truth.items():
               # Outbreaks in the inner loop to they can share trim and shift.
               assert (truedata_ct == len(truedata))
               tests.append(forecast.Context(truth_b.value, obk, tr, ho, i))
   return tests
Example #3
0
def tests_enumerate():
    'Return an iterable of possible contexts, given args and truth.'
    tests = list()
    truedata_ct = len(next(truth.items())[1])
    for tr in args.training:
        for ho in args.horizon:
            # Eenumerate every possible now with sufficient time before for the
            # training period and sufficient time after for at least one test.
            for i in forecast.nows(truedata_ct, tr, ho, args.teststride):
                for (obk, truedata) in truth.items():
                    # Outbreaks in the inner loop to they can share trim and shift.
                    assert (truedata_ct == len(truedata))
                    tests.append(
                        forecast.Context(truth_b.value, obk, tr, ho, i))
    return tests
Example #4
0
def tests_enumerate():
    'Return a list of possible contexts.'
    tests = list()
    for (ob, ob_truth) in g.truth.items():
        for tr in args.trainings:
            for ho in args.horizons:
                for i in forecast.nows(len(ob_truth), tr, ho, args.teststride):
                    tests.append(
                        forecast.Context(ob_truth,
                                         ob,
                                         tr,
                                         ho,
                                         i,
                                         minfinite=0.8,
                                         minrows=8))
    return tests