Spaces:
Sleeping
Sleeping
Daniel Varga
commited on
Commit
•
3705ebb
1
Parent(s):
c5bd69c
messing up dummy prediction
Browse files- v2/architecture.py +6 -2
v2/architecture.py
CHANGED
@@ -19,8 +19,11 @@ DO_VIS = False
|
|
19 |
# adds fields in-place
|
20 |
def add_dummy_predictions(all_data_with_predictions):
|
21 |
time_interval_min = all_data_with_predictions.index.freq.n
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
24 |
all_data_with_predictions['Consumption_prediction'] = all_data_with_predictions['Consumption'].shift(periods=cons_shift)
|
25 |
all_data_with_predictions['Production_prediction'] = all_data_with_predictions['Production'].shift(periods=prod_shift)
|
26 |
# we predict zero before we have data, no big deal:
|
@@ -197,6 +200,7 @@ def simulator(battery_model, prod_cons, decider):
|
|
197 |
'Production': prod_cons['Production']
|
198 |
})
|
199 |
results = results.set_index(prod_cons.index)
|
|
|
200 |
return results, total_network_fee
|
201 |
|
202 |
|
|
|
19 |
# adds fields in-place
|
20 |
def add_dummy_predictions(all_data_with_predictions):
|
21 |
time_interval_min = all_data_with_predictions.index.freq.n
|
22 |
+
MESSING_IT_UP_SHIFT = 0 * 60 // time_interval_min
|
23 |
+
if MESSING_IT_UP_SHIFT != 0:
|
24 |
+
print("To test dependence on prediction quality, we artificially mess up t-168 prediction with a", MESSING_IT_UP_SHIFT * time_interval_min / 60, "hour shift.")
|
25 |
+
cons_shift = 60 * 168 // time_interval_min + MESSING_IT_UP_SHIFT
|
26 |
+
prod_shift = 60 * 24 // time_interval_min + MESSING_IT_UP_SHIFT
|
27 |
all_data_with_predictions['Consumption_prediction'] = all_data_with_predictions['Consumption'].shift(periods=cons_shift)
|
28 |
all_data_with_predictions['Production_prediction'] = all_data_with_predictions['Production'].shift(periods=prod_shift)
|
29 |
# we predict zero before we have data, no big deal:
|
|
|
200 |
'Production': prod_cons['Production']
|
201 |
})
|
202 |
results = results.set_index(prod_cons.index)
|
203 |
+
# results['soc_series'].plot() ; plt.show() ; exit()
|
204 |
return results, total_network_fee
|
205 |
|
206 |
|