Skip to content

Commit

Permalink
Fix - Fixed to correct index length for ML forecaster prediction series
Browse files Browse the repository at this point in the history
  • Loading branch information
davidusb-geek committed Mar 17, 2023
1 parent 2910ff3 commit 188f67e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [0.4.8] - 2023-03-17
### Fix
- Fixed to correct index length for ML forecaster prediction series.

## [0.4.7] - 2023-03-16
### Fix
- Fixed wrong column name for var_load when using predict with ML forecaster.
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author = 'David HERNANDEZ'

# The full version, including alpha/beta/rc tags
release = '0.4.7'
release = '0.4.8'

# -- General configuration ---------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

setup(
name='emhass', # Required
version='0.4.7', # Required
version='0.4.8', # Required
description='An Energy Management System for Home Assistant', # Optional
long_description=long_description, # Optional
long_description_content_type='text/markdown', # Optional (see note above)
Expand Down
2 changes: 2 additions & 0 deletions src/emhass/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,8 @@ def get_load_forecast(self, days_min_load_forecast: Optional[int] = 3, method: O
else:
data_last_window = None
forecast_out = mlf.predict(data_last_window)
# Force forecast_out length to avoid mismatches
forecast_out = forecast_out.iloc[0:len(self.forecast_dates)]
# Define DataFrame
data_dict = {'ts':self.forecast_dates, 'yhat':forecast_out.values.tolist()}
data = pd.DataFrame.from_dict(data_dict)
Expand Down

0 comments on commit 188f67e

Please sign in to comment.