Help with data prediction algorithm

Thread Starter

rutendo

Joined Sep 24, 2017
10
i am in my final year and i am doing a household power saving and i need to predict how much the user is to consume every hour based on data collected over a month hourly and stored,so my question is which algorithm is easy to implement in C programme and which source material can i use for for creating my own module for data prediction.
 

wayneh

Joined Sep 9, 2010
17,498
So are history and hour-of-the-day the only variables, no weather, no motion detector to see if the person is home, and so on?

There are many ways to do time-series analysis. If your prediction is merely the 30-day moving average (for that hour of the day), you could store 24 arrays, one for each hour of the day. Add daily data FIFO so that the array always contains the 30 most recent entries. Compute the average once per day once the new data arrives.
 

MrSoftware

Joined Oct 29, 2013
2,202
Come up with the math first, THEN write the code. Trying to come up with the math at the same time you're writing the code will be more difficult.
 

Thread Starter

rutendo

Joined Sep 24, 2017
10
Come up with the math first, THEN write the code. Trying to come up with the math at the same time you're writing the code will be more difficult.
That's what i am asking for like the source material for algorithms that can be of use with good step by step explanations
 

Alec_t

Joined Sep 17, 2013
14,330
A 1 month period of data collection won't be sufficient unless the temperature of your environment is constant from one month to another. Winter usage and summer usage can be wildly different.
 
Top