Neural Network Data Input

5 views (last 30 days)
Randika Kosala
Randika Kosala on 17 Nov 2019
Answered: Raunak Gupta on 20 Nov 2019
Hi,
I have hourly weather and energy demand of a particular building for 6 years. I have arrange this data in to a multiple 2D arrays.
For example year 2000 data matrix looks like year2000Data = [Date_of_year Time_of_Day Temperature Windspeed RelHum Energy_Demand].
I would like to use data from 2000-2005 to train a MATLAB nueral network to predict hourly energy demand of this buidling when the Date_of_year Time Temperature Windspeed and RelHum is given as inputs.
Can someone kindly let me know how to arrange input and target data, also any line of advice to select the best neural network?
Thanks.

Answers (1)

Raunak Gupta
Raunak Gupta on 20 Nov 2019
Hi,
Since you wants to predict the Energy_Demand from the other properties that are given, I would suggest using a regression based Neural Network.
From the data I understand the Date_of_year and Time_of_Day will be non-numeric in nature so you may first need to transform these two variables to something numeric. You may try to give the dates as it is with January 1 corresponds to 1 and December 31 corresponds to 365/366. If the Date_of_year is given in datetime format you may directly use
day(Date_of_year,'dayofyear')
for converting to the format. For Time_of_Day you may try give 12:00 AM as 0 and 11:00 PM as 23 to get the corresponding numeric array.
You may try to club all data matrix into a single matrix that have the six variables that are mentioned for each row.
After that you may start with Regression Learner App that solve regression using classical Machine Learning Techniques or you may use Neural Network Fitting App which uses a single hidden layer Neural Network for Regression Problems. For more hidden layers you may try using fitnet and mentioning array of hiddenLayer sizes based on number of nodes needed in each layer.
For Neural Network Fitting and fitnet you need to divide the matrix of data into features that is the first five variables and target that is the last variable(Energy_Demand) beforehand.
Following documentation will help in setting up data for Regression Learner App.

Categories

Find more on Sequence and Numeric Feature Data Workflows in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!