Dynamic prediction of energy and power usage cost using linear regression-machine learning analysis

As a known fact, energy usage and demand exponentially rises year after year, hence forth power based companies are apparently looking out for a forecasting approach with better approximations. Based on the usage history at the customer level with the emergence of machine learning, and its association with various prediction and decision making fields. This paper aims to use a machine learning algorithm to predict the cost levied on the customer proportional to the usage. The efficacy of this model is compared to the results obtained with the mathematical computations. It is evident that the accuracy is 95% with reference to the multilinear regression algorithm


INTRODUCTION
Energy optimization is one of top areas of research interest.as a matter of fact the demand and productivity mismatch is increasing linearly, though various economic strategies are followed in residential complexes and commercial structures to optimize power which is obtained from fossil fuels, renewable and nuclear resources. If a Proper algorithm to anticipate the cost is to be deduced, measurement and estimation is the foremost task based on the International guidelines. Predicting the utilization of power and the cost related to the usage [1]-[3] involves tedious calculation and numerical computations. The Proposed method is a combination of machine learning techniques, probability and statistical concepts. The dynamic fast changing power consumption pattern can be accommodated using a machine learning linear regression and SVM model. This emerging concepts can be incorporated in smart grid and smart city Planning. Flexibility is a most valuable asset to particularly in power distribution and electricity retail segments.by using an adapting algorithm based on the demand and the production. The cost incurred and the fee levied on the customers can be changed. This can be associated with the [4]- [6]. The uber transport where the price is dependent on supply and demand. The objective of the user is to save money and time if the requirements are not narrowed down. Neural Network reinforced bearing is adopted [7]- [8]. The research on forecasting the usage is conducted meticulously based on the market characteristics and on par with the database. The tariff algorithm is generated and the same is been downloaded in the smart meters in residence. These meters are in turn connected to the cloud server and cost is generated on day basis which can be visible by the user and the utility can be varied accordingly.

MACHINE LEARNING MODELS
Machine learning is a category of artificial intelligence that facilitates nearer prediction of the output or 2 feature, without making use of traditional computational strategy. The objective is to train the machine with a set of predefined codes which enables the machine to take decisions based on the previous learning. Apparently a dynamic programming algorithm can replace a human decision on a particular task. In few situations this scenario has proved to be much better than human programmers in sensitive issues [9]- [10].Machine learning is a theory where you load immense data to the computer and instruct the machine to correlate the data in a particular pattern. These patterns are famously known as machine learning models or algorithms that can range from a simple linear equation to multi constraint complex equation, which is nearly impose the human calculation. The machine or the computer will utilize the model to learn the patterns in the features and output.

Supervised Learning
In this category the labelled data [11] is used to train the model based on the previous experience. This can be related to the very relevant prediction to know whether a person may be affected to covid 19 based on the temperature of the person symptoms, suffered, duration or occurrence and the previous medical history of the persons; the system learns the pattern and suggests the predictions. The illustration ( Figure.1) is given in the below.

Unsupervised learning
The utility of unsupervised learning ( Figure.2) is not as wide spread or prominent as supervised learning. Indeed, its used for a very narrowed application. In this category the machine is not assisted with concrete finite set of data and the outcomes cannot be predicted [12].

Reinforcement learning
Reinforcement learning (RL) is a sort of Machine Learning ( Figure.3) which is completely about taking appropriate action to exploit reward in a specific state. It is applied by many software and machines to identify the finest probable behaviour or route it should take in a particular state. RL means to establish or encourage a pattern of behaviour [13].

THEORY OF LINEAR REGRESSION
In statistics, one of the reliable and basic approach to build a relationship between two or more scalar responses (dependent and independent variable), They are basically classified into two categories namely simple linear regression and multiple linear regression [14- [15]. These are selected based on the number of features of the respective problem. It is a linear analysis hence not suitable for non-linear problems. This regression pattern is used extensively for various practical approaches. The versatility of the algorithm is based on a simple assumption that all the constraints involved in the problem are linear in nature. This could easily fit in a solution than a nonlinear problem. The set of equations [1], [2] and [3] Represent the steps involved to evaluate the coefficient of determination (R).The value of R gives the accuracy measure of the solution trained by the neurons to the actual mathematical calculation.

THEORETICAL CALCULATION OF POWER AND COST INCURRED
The day to day necessities such as heating, cooling, illuminations and much more required energy consumption which is customizable and reflects on the cost incurred The new revolutionized technology makes the appliance usage time based on service provider optimization and algorithm. For instance, high usage cost during peak time and minimal cost during the off peak hours. Firstly, the wattage of the device used and the time of usage is observed and the same is being calculated for 30 days roughly. The cumulative cost is figured out depending on the service provider's energy plan, the price is calculated as shown in Table 1, 2 and 3.

RESULTS AND DISCUSSION
Based on the performance evaluation metrics it is parametrized evidently by results that the error between the actual estimation and the computer learned estimation is minimized. The regression technique is aimed to generate a feasible plane, whose equation gives the solution more accurately. In linear regression method the final coefficient of determination in Figure.9 substantiate that the error is minimized and the most apt solution is obtained. Figure.4 to Figure.6 represents the python code for linear regression technique. The look up table of the power usage data in "kWh" for 30 days and the relevant cost is imported as a csv file. It can be located from the code, the training of the model is done with 80% of the data from the imported data and the testing is done using the balance 20%.The graph in Figure.8. Shows a straight line which passes through maximum possible nodes and the equation representing the line, proves to be a viable solution. In Figure.7. The regression graph for the testing the data is shown. Figure.9 shows the regression (R value) which is 98.6%. This conclude the accuracy in prediction to be very high.

CONCLUSION
Machine learning and its allied studies will be ruling the future in all tenures But the lack of skilled labour is to be considered as it's an emerging field. Dynamic calculation of cost proportional to the highly non-linear load is a challenging task but an appropriate and adaptable algorithm is making it a plug and play affair and claims to be more accurate with the results obtained through mathematical calculations. The coefficient of determination or the Accuracy metric component proves the validity of the theory. The text of your paper should be formatted as follows: