# multi regression for energy data

I'm trying to develop a multi regression model to predict energy consumption during one day period. X-set dimension is (10178, 52) and consist of 52-feature and Y-set dimension is (10178, 48) as output. I have used the following code:

xtrain, xtest, ytrain, ytest=train_test_split(X, Y, test_size=0.1)

in_dim = X.shape[1]
out_dim = Y.shape[1]
model = Sequential()

model.summary()
model.fit(xtrain,ytrain, epochs=100, batch_size=12,)


after compiling my model although my model's loss is very low but when I visualize my output the result is unsatisfying as follow:

any idea what I'm doing wrong?!? my initial guess is that since output dimension is high(48-dimension) compared to input dimension I need a lot more Data. or maybe I'm using wrong loss function or the model is too shallow. also it is noticeable that model's output at spark point is very poor.

As you can see, your predictions are able to catch the trends. In other words, the model is able to predict the direction of movement almost every day.

The only point that it is not able to catch is those high peaks, which can be treated as outliers. It is because due to seasonality or some other cause your daily data drastically changes on some of the days. This change is not normal for models to capture because those points deviate from the general characteristics of your time series.

It is quite normal having low energy consumption for 6 consecutive days but having a large energy consumption on the 7th day if you would consider that 6 days were sunny and suddenly the weather gets cold. This is just one single case where there might be lots of those.

To capture these anomalies you should have a variable to explain to them (e.g. Image that those anomalies are only due to weather conditions, then including weather variable would help you. However, it is too hard to find all those variables that explain all anomalies).

To solve the issue, you can decrease the frequency of your data. That is, instead of modeling daily data you can model weekly average or weekly end (means last day of every week), or even monthly average or monthly end.