Przeglądaj źródła

change extra_regressors to OrderedDict (#688)

S-Katagiri 6 lat temu
rodzic
commit
e63f8cdfbd
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      python/fbprophet/forecaster.py

+ 3 - 2
python/fbprophet/forecaster.py

@@ -10,12 +10,13 @@ from __future__ import division
 from __future__ import print_function
 from __future__ import unicode_literals
 
-from collections import defaultdict
+from collections import defaultdict, OrderedDict
 from datetime import timedelta
 import logging
 import numpy as np
 import pandas as pd
 
+
 from fbprophet.diagnostics import prophet_copy
 from fbprophet.models import prophet_stan_model
 from fbprophet.make_holidays import get_holiday_names, make_holidays_df
@@ -158,7 +159,7 @@ class Prophet(object):
         self.t_scale = None
         self.changepoints_t = None
         self.seasonalities = {}
-        self.extra_regressors = {}
+        self.extra_regressors = OrderedDict({})
         self.stan_fit = None
         self.params = {}
         self.history = None