Probabilistic Forecasting Model of Solar Power Outputs Based on the Naïve Bayes Classifier and Kriging Models

Solar power’s variability makes managing power system planning and operation difficult. Facilitating a high level of integration of solar power resources into a grid requires maintaining the fundamental power system so that it is stable when interconnected. Accurate and reliable forecasting helps to maintain the system safely given large-scale solar power resources; this paper therefore proposes a probabilistic forecasting approach to solar resources using the R statistics program, applying a hybrid model that considers spatio-temporal peculiarities. Information on how the weather varies at sites of interest is often unavailable, so we use a spatial modeling procedure called kriging to estimate precise data at the solar power plants. The kriging method implements interpolation with geographical property data. In this paper, we perform day-ahead forecasts of solar power based on the probability in one-hour intervals by using a Naïve Bayes Classifier model, which is a classification algorithm. We augment forecasting by taking into account the overall data distribution and applying the Gaussian probability distribution. To validate the proposed hybrid forecasting model, we perform a comparison of the proposed model with a persistence model using the normalized mean absolute error (NMAE). Furthermore, we use empirical data from South Korea’s meteorological towers (MET) to interpolate weather variables at points of interest.


Introduction
Solar energy utilization is rapidly growing all over the world.According to the International Renewable Energy Agency (IRENA), solar power generation capacity was 397 GW at the end of 2017.It took first place again with a capacity increase of 94 GW, accounting for a 32% increase-higher than the 10% wind power growth rate [1].In the United States, the electric power company PJM will supply 13% of its total load as renewable energy by 2031.In the case of solar power generation, installed capacity will be increased to 8.1 GW by 2027 [2].South Korea's solar power generation capacity is 904.1 MW and its cumulative installation capacity is 4519.4MW as of 2016, which is a small percentage compared with existing generators.As solar power generation capacity increases, many electric utilities are expected to have difficulty managing power system planning and operation.Meteorological variables that change over time and space mean that solar energy is highly intermittent and uncertain.Forecasting among various technologies can play an important role in preventing transmission congestion and maintaining a power balance, thus reducing the difficulty.Various forecasting techniques are being formulated abroad.UC San Diego uses a Total Sky Imager to predict the movement and location of clouds to forecast solar irradiation levels, determines the sky cover every 30 s, and estimates the position of clouds 5 min in advance [3,4].San Antonio, Texas, U.S. uses satellites to forecast and assess solar irradiation for use in solar power systems and Energies 2018, 11, 2982 3 of 15

A Hybrid Spatio-Temporal Forecasting Model
We introduce a hybrid method to probabilistically forecast solar power output using kriging and a naïve Bayes Classifier.Weather factors and historical data of solar power have a significant impact on forecasting the amount of solar power [24,25].However, obtaining data on meteorological variables that can change at any point of interest necessitates expensive equipment, and acquiring weather data over time and determining the forecast generation outputs based on that takes a long time.This paper estimates weather variables at points of interest economically and efficiently through a type of spatial modelling called kriging.In addition, solar power varies according to humidity, temperature, cloud cover amount, and wind speed; in particular, irradiation has the greatest influence on determining solar power output [26].However, since they have high variability and uncertainty, it is essential to use a probabilistic method.Figure 1 below shows the algorithm for the hybrid forecasting model.

A Hybrid Spatio-Temporal Forecasting Model
We introduce a hybrid method to probabilistically forecast solar power output using kriging and a naïve Bayes Classifier.Weather factors and historical data of solar power have a significant impact on forecasting the amount of solar power [24,25].However, obtaining data on meteorological variables that can change at any point of interest necessitates expensive equipment, and acquiring weather data over time and determining the forecast generation outputs based on that takes a long time.This paper estimates weather variables at points of interest economically and efficiently through a type of spatial modelling called kriging.In addition, solar power varies according to humidity, temperature, cloud cover amount, and wind speed; in particular, irradiation has the greatest influence on determining solar power output [26].However, since they have high variability and uncertainty, it is essential to use a probabilistic method.Figure 1 below shows the algorithm for the hybrid forecasting model.

Spatial Modelling Using the Kriging Technique
Spatial Modeling is a geo-statistics technique used in various fields of geoscience and engineering, such as pollution concentration and precipitation analysis, to analyze physical phenomena or data with spatial characteristics [27].This allows values of interest to be estimated using only current values and location data without historical data.Kriging is one spatial interpolation method that estimates data at target points based on regression against observed i  values of neighbor points, weighted according to spatial covariance values.The general formula for the ordinary kriging method is as shown in Equation (1) [28]: where *  is the estimated value of the target point, i  is a weight regarding the spatial distances between two points, and n is the number of neighbor points.In the ordinary kriging method, the

Spatial Modelling Using the Kriging Technique
Spatial Modeling is a geo-statistics technique used in various fields of geoscience and engineering, such as pollution concentration and precipitation analysis, to analyze physical phenomena or data with spatial characteristics [27].This allows values of interest to be estimated using only current values and location data without historical data.Kriging is one spatial interpolation method that estimates data at target points based on regression against observed α i values of neighbor points, weighted according to spatial covariance values.The general formula for the ordinary kriging method is as shown in Equation (1) [28]: where α * is the estimated value of the target point, λ i is a weight regarding the spatial distances between two points, and n is the number of neighbor points.In the ordinary kriging method, the weight must sum to 1 to avoid biased models and thus minimize the error variance between estimated and actual values.This method can be represented as shown in Figure 2.
weight must sum to 1 to avoid biased models and thus minimize the error variance between estimated and actual values.This method can be represented as shown in Figure 2. We minimize the error variance in the ordinary kriging method using the Lagrange function.
Performing the kriging method requires the weights of the ambient points; these values are combined linearly to estimate the results of spatial modelling.This equation has a minimum value in extremum, so we must perform two partial differentiations for  and  as shown in Equations (3) and (4).After we have solved the above equation,  can finally express the weights for neighboring points.However, as noted in Equation (1) [29], the sum of weights is 1.

Probabilistic Forecasting for Solar Power Using a Naï ve Bayes Classifier
A Naïve Bayes Classifier is machine learning technique based on Bayes probabilistic theory that represents the relationship between a prior probability and posterior probability using conditional probabilities [30][31][32][33][34]; it deals with decision problems mathematically under uncertainty and creates a simple and efficient model in the field of document taxonomy and disease prediction [35,36].This method makes classification rules based on historical data and applies new values to the class that is arranged according to predefined rules.The general formula for a Naïve Bayes Classifier is as shown in Equation (5) [30][31][32][33][34]: We minimize the error variance in the ordinary kriging method using the Lagrange function.L(λ 1 , λ 2 , • • • , λ i ; ω) is the objective function of the Lagrange and ω is the Lagrange factor as shown in Equation ( 2) [29].
Performing the kriging method requires the weights of the ambient points; these values are combined linearly to estimate the results of spatial modelling.This equation has a minimum value in extremum, so we must perform two partial differentiations for λ and ω as shown in Equations ( 3) and (4).After we have solved the above equation, λ can finally express the weights for neighboring points.However, as noted in Equation (1) [29], the sum of weights is 1.

Probabilistic Forecasting for Solar Power Using a Naïve Bayes Classifier
A Naïve Bayes Classifier is machine learning technique based on Bayes probabilistic theory that represents the relationship between a prior probability and posterior probability using conditional probabilities [30][31][32][33][34]; it deals with decision problems mathematically under uncertainty and creates a simple and efficient model in the field of document taxonomy and disease prediction [35,36].This method makes classification rules based on historical data and applies new values to the class that is arranged according to predefined rules.The general formula for a Naïve Bayes Classifier is as shown in Equation ( 5) [30][31][32][33][34]: where A and B are different events, A is a random variable denoting the class of an instance, and B is a vector of random variables denoting observed attribute values.This assumes that attribute values are independent, which means that one of several attribute values does not affect the other attribute values.When depicted graphically, a Naïve Bayes Classifier has a form such as that shown in Figure 3.

() PB
where A and B are different events, A is a random variable denoting the class of an instance, and B is a vector of random variables denoting observed attribute values.This assumes that attribute values are independent, which means that one of several attribute values does not affect the other attribute values.When depicted graphically, a Naïve Bayes Classifier has a form such as that shown in Figure 3.This assumption supports efficient algorithms that are simple to compute for test cases and to estimate from training data.The independency assumption means that the conditional probability is represented by the chain rule as shown in Equation ( 6) [30][31][32][33][34]. ) ) The probability of the attribute value located in the denominator serves as a normalized constant and does not affect the probability results, so we have omitted it for convenience of calculation.When we assign a new attribute value to a class based on predefined classification criteria, all classes will have a post probability, and the class among them with the maximum probability is finally selected as shown in Equation ( 7) [30][31][32][33][34].
A Naïve Bayes Classifier consists of prior and posterior probabilities.First, a "prior probability" is a probability that event A will occur before event B, and it gives the number of classes. ()  prior PA refers to the ratio of the number of specific classes for all classes, 1 () The prior probability is represented as shown in Equation ( 8) below.The larger the amount of data, the more different the class, and the prior probability can be adjusted depending on the class range setting [30][31][32][33][34].
A "conditional probability" is the probability that event A will occur when event B happens.We calculated the probability for the occurrence of event A using a probability distribution because it is generally assumed to follow a normal distribution in the Naïve Bayes Classifier method.This is fulfilled by a graph in which the probability distribution is symmetrical in relation to the mean.This is determined by the new value and the defined normal distribution.The Naïve Bayes Classifier treats discrete and numeric attributes somewhat differently.For each discrete attribute, the conditional probability is modeled as a single number between 0 and 1.In contrast, each This assumption supports efficient algorithms that are simple to compute for test cases and to estimate from training data.The independency assumption means that the conditional probability is represented by the chain rule as shown in Equation ( 6) [30][31][32][33][34].
The probability of the attribute value located in the denominator serves as a normalized constant and does not affect the probability results, so we have omitted it for convenience of calculation.When we assign a new attribute value to a class based on predefined classification criteria, all classes will have a post probability, and the class among them with the maximum probability is finally selected as shown in Equation ( 7) [30][31][32][33][34].
A Naïve Bayes Classifier consists of prior and posterior probabilities.First, a "prior probability" is a probability that event A will occur before event B, and it gives the number of classes.P(A prior ) refers to the ratio of the number of specific classes for all classes, ∑ m k=1 N(A k ).The prior probability is represented as shown in Equation ( 8) below.The larger the amount of data, the more different the class, and the prior probability can be adjusted depending on the class range setting [30][31][32][33][34].
A "conditional probability" is the probability that event A will occur when event B happens.We calculated the probability for the occurrence of event A using a probability distribution because it is generally assumed to follow a normal distribution in the Naïve Bayes Classifier method.This is fulfilled by a graph in which the probability distribution is symmetrical in relation to the mean.This is determined by the new value and the defined normal distribution.The Naïve Bayes Classifier treats discrete and numeric attributes somewhat differently.For each discrete attribute, the conditional probability is modeled as a single number between 0 and 1.In contrast, each numeric attribute is modeled by some continuous probability distribution over the range of that attribute's values.We can write continuous attributes as shown in Equation ( 9) where B new is the new attribute's value, µ is its mean, and σ is its standard deviation [30,34].

Estimating Weather Data at Solar Farm "A" Using the Kriging Technique
In this case study, we forecast the output of solar power a day ahead in South Korea.We applied the kriging technique using weather information and location data for neighbor points.Figure 4 represents solar farm site "A" and 30 nearby meteorological towers in South Korea using Google Maps.Before applying the kriging method, we collected latitude and longitude data for both the meteorological towers and solar farm "A".Table 1 shows the coordinate data for applying the kriging method.The weather information was measured at the meteorological towers from 1 January 2015 to December 2016 in hourly intervals.
 

Estimating Weather Data at Solar Farm "A" Using the Kriging Technique
In this case study, we forecast the output of solar power a day ahead in South Korea.We applied the kriging technique using weather information and location data for neighbor points.Figure 4 represents solar farm site "A" and 30 nearby meteorological towers in South Korea using Google Maps.Before applying the kriging method, we collected latitude and longitude data for both the meteorological towers and solar farm "A".Table 1 shows the coordinate data for applying the kriging method.The weather information was measured at the meteorological towers from 1 January 2015 to December 2016 in hourly intervals.We estimated the weather data at the solar farm using information relating to neighboring points; we need the weights of 30 meteorological points for 1 site of interest.We calculated these weights based on the spatial correlation, and sum of the weights must be 1. Figure 5 shows the locations and weights of neighboring points.MET 13 has the greatest impact on the point of interest.We estimated the weather data at the solar farm using information relating to neighboring points; we need the weights of 30 meteorological points for 1 site of interest.We calculated these weights based on the spatial correlation, and sum of the weights must be 1. Figure 5 shows the locations and weights of neighboring points.MET 13 has the greatest impact on the point of interest.Table 2 provides detailed weights of METs.We performed the kriging method to estimate the weather information at the solar farm in 2016.The result of estimating the irradiance, humidity, and temperature linearly combine the weights and values of weather information for neighboring points using Equation (1). Figure 6 shows the results of the kriging method at solar farm "A" for August 2016.We performed the kriging method to estimate the weather information at the solar farm in 2016.The result of estimating the irradiance, humidity, and temperature linearly combine the weights and values of weather information for neighboring points using Equation (1). Figure 6 shows the results of the kriging method at solar farm "A" for August 2016.To verify to the accuracy of the model, cross validation was performed.After assuming that the acquired meteorological data was unknown, we compared the actual and forecast data by the remaining data.Table 3 shows the results of cross validation of irradiance for five points representing each administrative district.Now, we need to make a classifier for solar power output forecast using a Naïve Bayes Classifier based on a probabilistic approach.Therefore, we must map weather data and solar power output data by the hour.

Probabilistic Forecasting for Solar Power Using a Naï ve Bayes Classifier Technique
We forecasted the output of solar farm "A" based on the estimated weather data for 30 neighboring points.The prior and conditional probability are essential components of forecasting the solar power output.We calculated the prior probability for each solar power output at solar farm "A" using Equation ( 8); the results are as shown in Figure 7.In this figure, a value of 0 among the solar power output values was excluded because the prior probability corresponding to 0 was significantly higher than the other output values.
We used the prior probability calculated above to forecast the amount of solar power by multiplying it by the conditional probability.In addition, we could optionally utilize Laplacian correction to avoid the problem in which there is a 0 for the prior probability to produce outputs that do not exist in the past.
Finally, we must compute the conditional probability regarding each weather factor to forecast the solar power output since we treat numeric attributes over the range of an attribute's values.Figure 8 shows the normal distribution of solar irradiance that could occur when the solar power output is 4.9 MW.In the event of 4.9 MW, it indicates that irradiance occurs in the middle.To verify to the accuracy of the model, cross validation was performed.After assuming that the acquired meteorological data was unknown, we compared the actual and forecast data by the remaining data.Table 3 shows the results of cross validation of irradiance for five points representing each administrative district.Now, we need to make a classifier for solar power output forecast using a Naïve Bayes Classifier based on a probabilistic approach.Therefore, we must map weather data and solar power output data by the hour.

Probabilistic Forecasting for Solar Power Using a Naïve Bayes Classifier Technique
We forecasted the output of solar farm "A" based on the estimated weather data for 30 neighboring points.The prior and conditional probability are essential components of forecasting the solar power output.We calculated the prior probability for each solar power output at solar farm "A" using Equation ( 8); the results are as shown in Figure 7.In this figure, a value of 0 among the solar power output values was excluded because the prior probability corresponding to 0 was significantly higher than the other output values.
We used the prior probability calculated above to forecast the amount of solar power by multiplying it by the conditional probability.In addition, we could optionally utilize Laplacian correction to avoid the problem in which there is a 0 for the prior probability to produce outputs that do not exist in the past.
Finally, we must compute the conditional probability regarding each weather factor to forecast the solar power output since we treat numeric attributes over the range of an attribute's values.Figure 8 shows the normal distribution of solar irradiance that could occur when the solar power output is 4.9 MW.In the event of 4.9 MW, it indicates that irradiance occurs in the middle.We calculated the probabilities of the estimated weather values, such as in Figure 6, at the solar farm by applying them at the forecast point to the predefined classifier.We classified all models according to the solar power output values provided with the estimated weather values and showed the probability through a continuous normal distribution function.The summation of the conditional probability and the prior probability as shown in Equation ( 6) allows us to determine the post probability for each model.We can acquire one model with the maximum probability as shown in Equation (7).Based on data from 2015 up to the previous day of forecasting, we can forecast the solar power output by selecting the models with highest probability for the year 2016.Figure 9 shows two outputs of solar power by comparing the actual and forecast values over August.The red line is the output value predicted by the Naïve Bayes Classifier technique, and the blue line is the actual output value measured at solar farm "A".We calculated the probabilities of the estimated weather values, such as in Figure 6, at the solar farm by applying them at the forecast point to the predefined classifier.We classified all models according to the solar power output values provided with the estimated weather values and showed the probability through a continuous normal distribution function.The summation of the conditional probability and the prior probability as shown in Equation ( 6) allows us to determine the post probability for each model.We can acquire one model with the maximum probability as shown in Equation (7).Based on data from 2015 up to the previous day of forecasting, we can forecast the solar power output by selecting the models with highest probability for the year 2016.Figure 9 shows two outputs of solar power by comparing the actual and forecast values over August.The red line is the output value predicted by the Naïve Bayes Classifier technique, and the blue line is the actual output value measured at solar farm "A".We calculated the probabilities of the estimated weather values, such as in Figure 6, at the solar farm by applying them at the forecast point to the predefined classifier.We classified all models according to the solar power output values provided with the estimated weather values and showed the probability through a continuous normal distribution function.The summation of the conditional probability and the prior probability as shown in Equation ( 6) allows us to determine the post probability for each model.We can acquire one model with the maximum probability as shown in Equation (7).Based on data from 2015 up to the previous day of forecasting, we can forecast the solar power output by selecting the models with highest probability for the year 2016.Figure 9 shows two outputs of solar power by comparing the actual and forecast values over August.The red line is the output value predicted by the Naïve Bayes Classifier technique, and the blue line is the actual output value measured at solar farm "A".
We performed day-ahead forecasting for the year 2016 and we used the NMAE (%) to view the accuracy of the forecast using the Naïve Bayes Classifier method.Table 4 describes the NMAE for the results of each forecasting model, and expresses a percentage of the installed capacity, 11 MW.The NMAE is as shown in Equation (10) [37,38]: where SP h and SP f orecast h are the actual and forecasted solar power for period h, and SP ins refers to the installed solar power capacity.We performed day-ahead forecasting for the year 2016 and we used the NMAE (%) to view the accuracy of the forecast using the Naïve Bayes Classifier method.Table 4 describes the NMAE for the results of each forecasting model, and expresses a percentage of the installed capacity, 11MW.The NMAE is as shown in Equation (10) [37,38]   Normally, since the output is significantly more likely to be a 0 during periods when the sun does not rise, we considered the NMAE of the forecasting model except when both the forecast and measured values were 0. Figure 10 expresses the forecast error with and without 0 outputs.Additionally, the NMAE of the forecasting model for the year of 2016 is about 4%, and the accuracy for summer is better than that for winter.
Several North American utilities have been forecasting solar power since the 2000s.Most operating entities use NMAE as a forecasting error assessment; as shown in Table 5, they had levels below 10% in 2013 [37].In this paper, we identified an improvement in the proposed model compared to the persistence model, as shown in Figure 11 and Table 6.Normally, since the output is significantly more likely to be a 0 during periods when the sun does not rise, we considered the NMAE of the forecasting model except when both the forecast and measured values were 0. Figure 10 expresses the forecast error with and without 0 outputs.Additionally, the NMAE of the forecasting model for the year of 2016 is about 4%, and the accuracy for summer is better than that for winter.
Several North American utilities have been forecasting solar power since the 2000s.Most operating entities use NMAE as a forecasting error assessment; as shown in Table 5, they had levels below 10% in 2013 [37].In this paper, we identified an improvement in the proposed model compared to the persistence model, as shown in Figure 11 and Table 6.we proposed a probabilistic solar power output forecast method using a hybrid spatio-temporal forecasting model.We applied two estimating techniques to forecast the output of a solar power farm.Firstly, since numerical weather prediction models are difficult to apply in forecasting, kriging helps to perform spatial modeling for sites of interest using data from nearby points, as noted in Section 2.1.
The results of the method give us relatively precise weather information.Secondly, we applied the Naïve Bayes Classifier method based on the probability.Unlike previous studies in which weather values were difficult to apply at the exact point and where discrete values were used, the proposed model allows for the consideration of meteorological values that are not applied to the classifier because of the continuous probability distribution.Finally, we applied the hybrid spatio-temporal forecasting model using empirical data to a solar farm located in South Korea and evaluated the performance of the model.As a result, it was confirmed that the NMAE of the forecasting model had a value of less than 10%.The proposed forecasting model based on a probabilistic approach shows improved results when compared to the deterministic persistence forecasting model.
In future, we will carry out probabilistic forecasting model improvements using a different probability distribution that will be used to better reflect the characteristics of the data.Also, we will represent a probabilistic range to ensure better results.

Figure 1 .
Figure 1.Algorithm for the hybrid spatio-temporal forecasting model.

Figure 1 .
Figure 1.Algorithm for the hybrid spatio-temporal forecasting model.
the objective function of the Lagrange and  is the Lagrange factor as shown in Equation (2) [29].

Figure 4 .
Figure 4. Location data of both 30 METs and the solar farm.

Figure 4 .
Figure 4. Location data of both 30 METs and the solar farm.

Figure 5 .
Figure 5. Locations and weights of METs.Figure 5. Locations and weights of METs.

Figure 5 .
Figure 5. Locations and weights of METs.Figure 5. Locations and weights of METs.

Figure 6 .
Figure 6.Weather data estimated at solar farm "A" and measured at three highly weighted neighboring points for August 2016.(a) Irradiance; (b) Humidity; (c) Temperature.

Figure 7 .
Figure 7. Prior probability used in the simulation.

Figure 8 .
Figure 8. Probability distribution of the irradiance given that the solar output is 4.9 MW.

Figure 8 .
Figure 8. Probability distribution of the irradiance given that the solar output is 4.9 MW.

Figure 8 .
Figure 8. Probability distribution of the irradiance given that the solar output is 4.9 MW.

Energies 2018 , 15 Figure 9 .
Figure 9.Comparison of the actual and forecast solar power in August 2016. : and forecasted solar power for period h, and ins SP refers to the installed solar power capacity.

Figure 9 .
Figure 9.Comparison of the actual and forecast solar power in August 2016.

Table 1 .
Location data of both 30 METs and the solar farm.

Table 1 .
Location data of both 30 METs and the solar farm.

Table 2
provides detailed weights of METs.

Table 2 .
Weights of 30 METs for solar farm "A".

Table 2 .
Weights of 30 METs for solar farm "A".

Table 3 .
Cross validation error for irradiance of five METs.

Table 3 .
Cross validation error for irradiance of five METs.

Table 4 .
The normalized mean absolute error (NMAE) for each month of forecasting in 2016.

Table 5 .
Assessments of forecasting accuracy.

Table 4 .
The normalized mean absolute error (NMAE) for each month of forecasting in 2016.

Table 5 .
Assessments of forecasting accuracy.