Skip to content

Commit

Permalink
Fix - Fixed wrong column name for var_load when using predict with ML…
Browse files Browse the repository at this point in the history
… forecaster
  • Loading branch information
davidusb-geek committed Mar 16, 2023
1 parent 3a27362 commit 2910ff3
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 3 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.7] - 2023-03-16
### Fix
- Fixed wrong column name for var_load when using predict with ML forecaster.

## [0.4.6] - 2023-03-16
### Fix
- Fixed wrong path for saved ML forecaster model.
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.6'
release = '0.4.7'

# -- 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.6', # Required
version='0.4.7', # 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
1 change: 1 addition & 0 deletions src/emhass/forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ def get_load_forecast(self, days_min_load_forecast: Optional[int] = 3, method: O
# Make predictions
if use_last_window:
data_last_window = copy.deepcopy(df)
data_last_window = data_last_window.rename(columns={self.var_load_new: self.var_load})
else:
data_last_window = None
forecast_out = mlf.predict(data_last_window)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_forecast.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def test_get_load_forecast_mlforecaster(self):
}
runtimeparams_json = json.dumps(runtimeparams)
params['passed_data'] = runtimeparams
params['optim_conf'][8]['load_forecast_method'] = 'skforecast'
params['optim_conf'][8]['load_forecast_method'] = 'mlforecaster'
params_json = json.dumps(params)
input_data_dict = set_input_data_dict(config_path, base_path, costfun, params_json, runtimeparams_json,
action, logger, get_data_from_file=True)
Expand Down

0 comments on commit 2910ff3

Please sign in to comment.