Monday, 5 June 2023

Artificial Intelligence in Smart Grid - Short Term Load Forecasting using Decision Tree Regressor and the K-Nearest Neighbors Regressor

 The course ECE 563, AI in Smart Grid, focuses on examining artificial intelligence (AI) and Machine Learning (ML) and their application in power and energy systems. It covers fundamental computational techniques for implementing AI and ML using Python Programming Language. Therefore, the goal of this Project was to analyze the load and temperature data recorded by various utility companies in the United States (U.S.). The dataset contained information from Twenty (20) zones, each with a unique hourly load pattern and Eleven (11) temperature stations, each located differently. The initial aim was to identify any patterns or correlations between the temperature stations and load values in each zone. If a strong correlation was found between a temperature station and the load values of a specific zone, that station's temperature data was used to predict the load values for that zone. However, if there was no strong correlation, a methodology was prescribed for selecting a station's temperature data to use in a machine learning algorithm to predict load values for each load zone. Two machine learning algorithms were used to predict load values in each load zone in this project. The first algorithm was the Decision Tree Regressor, and the second algorithm was the K-Nearest Neighbors Regressor (KNN Regressor).

 A Decision Tree Regressor is a supervised learning algorithm that is used for regression problems. It works by recursively splitting the dataset into smaller subsets based on the most significant features until a stopping criterion is reached. Each split is based on a decision rule that maximizes the difference between the target variable's values. Once the tree is constructed, it can be used to make predictions on new data by traversing the tree from the root node to the leaf node that corresponds to the observation being predicted. The predicted value is the average of the target values in the leaf node. Decision Tree Regressors are intuitive and easy to interpret, and they can capture nonlinear relationships between the features and the target variable. However, they can be prone to overfitting and may not generalize well to new data if the tree is too complex.

The KNN Regressor is also used for regression tasks. In KNN Regressor, the output value of an unknown sample is estimated by the average value of the output of the K-nearest neighbors of that sample in the training dataset. To make a prediction with KNN Regressor, the algorithm finds the K training samples that are closest to the new data point, based on a distance metric (e.g., Euclidean distance). The predicted value is then the mean (or median) of the output values of those K nearest neighbors. KNN Regressor can be useful when the relationship between the input and output is not well defined or has a complex pattern. However, the choice of K (the number of neighbors to consider) can affect the performance of the algorithm, and it is usually chosen through cross-validation. Additionally, KNN Regressor requires storing the entire training dataset, which can be memory-intensive for large datasets.

No comments:

Post a Comment