You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
whilenew_stdev_pct>stdev_pct_max:
outliers= [
abs(bill.ua-avg_ua)
forbillinwinter_processed_energy_billsifbill.uaisnotNone
]
biggest_outlier=max(outliers)
biggest_outlier_idx=outliers.index(biggest_outlier)
outlier=winter_processed_energy_bills.pop(
biggest_outlier_idx
) # removes the biggest outlieroutlier.eliminated_as_outlier=Trueuas_i= [
processed_energy_bill.uaforprocessed_energy_billinwinter_processed_energy_billsifprocessed_energy_bill.uaisnotNone
]
avg_ua_i=sts.mean(uas_i)
stdev_pct_i=sts.pstdev(uas_i) /avg_ua_iif (
# the outlier has been removednew_stdev_pct-stdev_pct_i<max_stdev_pct_diff
): # if it's a small enough change# add the outlier back inwinter_processed_energy_bills.append(
outlier
) # then it's not worth removing it, and we exitoutlier.eliminated_as_outlier=Falsebreak# may want some kind of warning to be raised as wellelse:
uas, avg_ua, stdev_pct=uas_i, avg_ua_i, stdev_pct_iresults=Home._refine_balance_point(
balance_point=balance_point,
balance_point_sensitivity=next_balance_point_sensitivity,
avg_ua=avg_ua,
stdev_pct=stdev_pct,
thermostat_set_point=thermostat_set_point,
winter_processed_energy_bills=winter_processed_energy_bills,
)
new_balance_point=results.balance_pointnew_avg_ua=results.avg_uanew_stdev_pct=results.stdev_pctbalance_point_graph_records_extension= (
results.balance_point_graph_records_extension
)
ifisinstance(balance_point_graph_records_extension, list):
balance_point_graph.records.extend(
balance_point_graph_records_extension
)
The text was updated successfully, but these errors were encountered:
We removed this code that would help support derived outliers, should they be chosen to be implemented in a later version.
test_engine.py
engine.py
The text was updated successfully, but these errors were encountered: