Housiadas / forecasting-energy-consumption-LSTM

Development of a machine learning application for IoT platform to predict electric energy consumption in smart building environment in real time.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inverse_transform raise a ValueError below

avadw2021 opened this issue · comments

Hi Christos,
I have studied this case for my assignment and encountered the ValueError. Could you please let me know how you solved this issue? Thanks!


vals = scaler.inverse_transform(vals)


ValueError Traceback (most recent call last)
in ()
26 vals = test_df.values.copy()
27 #print(vals)
---> 28 vals = scaler.inverse_transform(vals)
29 print(f'vals: {vals.shape}')
30 print(test_x.shape)

/usr/local/lib/python3.7/dist-packages/sklearn/preprocessing/data.py in inverse_transform(self, X, copy)
1033 else:
1034 if self.with_std:
-> 1035 X *= self.scale

1036 if self.with_mean:
1037 X += self.mean_

ValueError: operands could not be broadcast together with shapes (8439,5) (4,) (8439,5)

Hello,

Sorry it's been two years since I last run this code. I don't remember at all.

Good luck!