Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -61,11 +61,14 @@ def train_and_forecast(
|
|
61 |
# gluon_df = PandasDataset(df, target=df.columns[0])
|
62 |
# except TypeError:
|
63 |
freq = pd.infer_freq(df.index[:3])
|
|
|
64 |
date_range = pd.date_range(df.index[0], pd.DateOffset(months=prediction_length//2) + df.index[-1], freq=freq)
|
|
|
65 |
new_df = df.reindex(date_range)
|
66 |
print(new_df)
|
67 |
gluon_df = PandasDataset(new_df, target=new_df.columns[0], freq=freq)
|
68 |
-
|
|
|
69 |
training_data, test_gen = split(gluon_df, offset=row_offset)
|
70 |
|
71 |
if distribution == "StudentT":
|
|
|
61 |
# gluon_df = PandasDataset(df, target=df.columns[0])
|
62 |
# except TypeError:
|
63 |
freq = pd.infer_freq(df.index[:3])
|
64 |
+
print(freq)
|
65 |
date_range = pd.date_range(df.index[0], pd.DateOffset(months=prediction_length//2) + df.index[-1], freq=freq)
|
66 |
+
print(date_range)
|
67 |
new_df = df.reindex(date_range)
|
68 |
print(new_df)
|
69 |
gluon_df = PandasDataset(new_df, target=new_df.columns[0], freq=freq)
|
70 |
+
print(gluon_df)
|
71 |
+
|
72 |
training_data, test_gen = split(gluon_df, offset=row_offset)
|
73 |
|
74 |
if distribution == "StudentT":
|