0% found this document useful (0 votes)
6 views16 pages

Duhayyim

The article presents the Fuzzy Cognitive Maps with a Metaheuristics-based Rainfall Prediction System (FCMM-RPS) designed to improve rainfall forecasting accuracy in smart cities, achieving a maximum accuracy of 94.22%. The FCMM-RPS technique involves data preprocessing, prediction using a FCM model, and parameter optimization through a modified butterfly optimization algorithm. This approach addresses the complexities of rainfall prediction exacerbated by extreme climate changes, enhancing planning for various sectors such as agriculture and transportation.

Uploaded by

елена
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views16 pages

Duhayyim

The article presents the Fuzzy Cognitive Maps with a Metaheuristics-based Rainfall Prediction System (FCMM-RPS) designed to improve rainfall forecasting accuracy in smart cities, achieving a maximum accuracy of 94.22%. The FCMM-RPS technique involves data preprocessing, prediction using a FCM model, and parameter optimization through a modified butterfly optimization algorithm. This approach addresses the complexities of rainfall prediction exacerbated by extreme climate changes, enhancing planning for various sectors such as agriculture and transportation.

Uploaded by

елена
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

sustainability

Article
Modeling of Fuzzy Cognitive Maps with a Metaheuristics-
Based Rainfall Prediction System
Mesfer Al Duhayyim 1, *, Heba G. Mohamed 2 , Jaber S. Alzahrani 3 , Rana Alabdan 4 , Mohamed Mousa 5 ,
Abu Sarwar Zamani 6 , Ishfaq Yaseen 6 and Mohamed Ibrahim Alsaid 6

1 Department of Computer Science, College of Computer Engineering and Sciences, Prince Sattam bin
Abdulaziz University, Al-Kharj 16273, Saudi Arabia
2 Department of Electrical Engineering, College of Engineering, Princess Nourah bint Abdulrahman University,
Riyadh 11671, Saudi Arabia
3 Department of Industrial Engineering, College of Engineering at Alqunfudah, Umm Al-Qura University,
Mecca 24382, Saudi Arabia
4 Department of Information Systems, College of Computer and Information Science, Majmaah University,
Al-Majmaah 11952, Saudi Arabia
5 Department of Electrical Engineering, Faculty of Engineering and Technology, Future University in Egypt,
New Cairo 11845, Egypt
6 Department of Computer and Self Development, Preparatory Year Deanship, Prince Sattam bin Abdulaziz
University, Al-Kharj 16278, Saudi Arabia
* Correspondence: m.alduhayyim@psau.edu.sa

Abstract: Rainfall prediction remains a hot research topic in smart city environments. Precise rainfall
prediction in smart cities becomes essential for planning security measures before construction and
transportation activities, flight operations, water reservoir systems, and agricultural tasks. Precise
rainfall forecasting now becomes more complex than before because of extreme climatic changes.
Machine learning (ML) approaches can forecast rainfall by deriving hidden patterns from historic
meteorological datasets. Selecting a suitable classification method for forecasting has become a tough
Citation: Al Duhayyim, M.; job. This article introduces the Fuzzy Cognitive Maps with a Metaheuristics-based Rainfall Prediction
Mohamed, H.G.; Alzahrani, J.S.; System (FCMM-RPS) technique. The intention of the FCMM-RPS technique is to predict rainfall
Alabdan, R.; Mousa, M.; Zamani, automatically and efficiently. To accomplish this, the presented FCMM-RPS technique primarily
A.S.; Yaseen, I.; Alsaid, M.I. Modeling
pre-processes the rainfall data to make it compatible. In addition, the presented FCMM-RPS technique
of Fuzzy Cognitive Maps with a
predicts rainfall using the FCM model. To enhance the rainfall prediction outcomes of the FCM model,
Metaheuristics-Based Rainfall
the parameter optimization process is performed using a modified butterfly optimization algorithm
Prediction System. Sustainability 2023,
(MBOA). The performance assessment of the FCMM-RPS technique is tested on a rainfall dataset.
15, 25. https://doi.org/10.3390/
su15010025
A widespread comparison study highlights the improvements of the FCMM-RPS technique in the
rainfall forecasting process compared to existing techniques with a maximum accuracy of 94.22%.
Academic Editors: Daniel Słyś,
Sabina Kordana-Obuch,
Keywords: rainfall forecasting; weather; machine learning; artificial intelligence; parameter optimization
Kamil Pochwat and Mariusz Starzec

Received: 16 October 2022


Revised: 14 December 2022
Accepted: 15 December 2022 1. Introduction
Published: 20 December 2022
Rainfall is the most significant phenomenon within a climate system and its chaotic
nature has a direct effect on biological systems, water resource planning, and agriculture [1].
In finance, the rainfall level for a specific period is essential to predict the value of financial
Copyright: © 2022 by the authors.
security. Currently, the abilities of scientists in predicting and understanding rainfall have
Licensee MDPI, Basel, Switzerland. been augmented because of several methods formulated to raise the precision level in
This article is an open access article rainfall prediction [2]. Rainfall forecasting is useful to prevent floods, which saves the
distributed under the terms and properties and lives of humans. Additionally, it aids in managing water resources. Data for
conditions of the Creative Commons information relating to rainfall in advance assists agriculturalists in managing their crops
Attribution (CC BY) license (https:// better [3]. Variation in rainfall quantity and timing makes rainfall prediction a difficult
creativecommons.org/licenses/by/ task for weather-related scientists [4]. Rainfall derivatives share the same principles with
4.0/). other regular and climate variations. It is the agreement between two or more, in which the

Sustainability 2023, 15, 25. https://doi.org/10.3390/su15010025 https://www.mdpi.com/journal/sustainability


Sustainability 2023, 15, 25 2 of 16

contract value relies on the basic financial asset. Therefore, in the case of rainfall prediction,
the basic asset will be a climate type, like rainfall [5]. One important variance among
weather and common derivatives is that the primary asset that decides the price of the
contract is not tradable. Consequently, several existing techniques in the literature for other
derivatives are inappropriate for predicting rainfall prediction [6].
The conventional techniques use statistical approaches to measure the correlations
among rainfall, geographic coordinates (like longitude and latitude), and other elements
(like wind speed, pressure, humidity, and temperature) [7]. However, the complexity
of these elements and rainfall’s non-linearity make it tough to forecast. Accordingly, ef-
forts have been made to diminish this nonlinearity by utilizing Wavelet analysis, Singular
Spectrum Analysis, and Empirical Mode Decompositions, among others [8]. However,
the statistical and mathematical approaches used required more time and complicated
computation with minimal effects. The estimation of rainfall derivatives imposes vari-
ous hindrances, both in finance and research [9]. A light amount of the literature has
investigated rainfall derivatives, since the concept is new, along with the fact that rainfall
is hard to measure precisely. In financial practice, investors even share similar forms of
problems, deterring the trading of weather derivatives in monetary markets [10]. Thus, the
aim was to formulate a technique for precise weather forecasting, which must reduce the
practical risk from investors. Accurate rainfall forecasting is a challenging process because
of extreme climate variations. Artificial intelligence (AI) approaches can forecast rainfall
via the extraction of hidden patterns from past weather data.
Accurate rainfall prediction becomes challenging because of extreme climate variations.
Particularly, precise and timely rainfall prediction can be useful for planning and security
measures for flight operation, agriculture, water reservoir management, construction, and
transportation activities. A red alert in advance in the case of extreme rainfall can save
the citizens of smart cities from potentially life-threatening situations. AI techniques can
predict rainfall by extracting hidden patterns from historical weather data. Moreover, the
selection of proper classification techniques for prediction is a difficult job.
To resolve these issues, this article introduces the Fuzzy Cognitive Maps with a
Metaheuristics-based Rainfall Prediction System (FCMM-RPS) technique. The intention of
the FCMM-RPS technique is to predict rainfall automatically and efficiently. To accomplish
this, the presented FCMM-RPS technique primarily preprocesses the rainfall data to make
it compatible. In addition, the presented FCMM-RPS technique predicts rainfall using the
FCM model. To enhance the rainfall prediction outcomes of the FCM model, the parameter
optimization process is performed using a modified butterfly optimization algorithm
(MBOA). The MBOA is chosen due to its simplicity, easy implementation, and high stability.
The performance assessment of the FCMM-RPS technique is tested on a rainfall dataset.
The rest of the paper is organized as follows. Existing rainfall prediction models are
discussed in Section 2, and Section 3 introduces the proposed FCMM-RPS technique. Next,
Section 4 offers performance validation and Section 5 draws conclusions.

2. Related Works
Rahman et al. [11] devise a new real-time rainfall prediction system for smart cities
utilizing a machine learning (ML) fusion method. This modeled structure employs four
commonly employed supervised ML approaches. For effective rainfall forecasting, the
fuzzy logic (FL) method was used in the structure for integrating the prediction accuracy
of the ML approach called fusion. Pathan et al. [12] proposed an effective approach for
predicting rainfall events for dimensionality reductions. Initially, the authors detected
appropriate features from weather data that had a main contribution to rainfall forecasting
utilizing a wrapper-oriented feature selection (FS) approach. Then, principal component
analysis (PCA) was compiled with the complete data along with the selected feature data
to minimize the data dimensionality. Poornima and Pushpalatha [13] offered an intensified
long short-term memory (LSTM)-oriented recurrent neural network (RNN) for rainfall
Sustainability 2023, 15, 25 3 of 16

forecasting. The neural network (NN) was tested and trained with a standard rainfall
dataset. The well-trained network produced estimated features of rainfall.
He et al. [14] modeled a hybrid method STL-ML (seasonal trend decomposition
and ML) to forecast the rainfall time series in advance related to historic rainfall and
other atmospheric data. This STL-ML method has three steps: firstly, the forecasted
rainfall is acquired through the inclusion of the predicted values of the three elements, and
many metrics are employed for assessing the performance of the method. Secondly, the
seasonal trend decomposition is leveraged for decomposing the rainfall time series into the
remainder, trend, and seasonal elements. Lastly, three different ML methods such as the
LightGBM model, GRU network, and multi-time scale are formulated to forecast the three
elements. In [15], artificial neural networks (ANNs) such as the Feed Forward NN (FFNN)
method were framed to forecast rainfall. ANNs are considered an attractive and valuable
soft-computing technique for forecasting. ANN depends on a self-adaptive system where
the method learns from historic data capturing functional relationships among data and
making forecasts on present data.
Wei and Chou [16] devised a Hadoop Spark distribution structure related to big-data
technology for hastening the computation of typhoon rainfall forecasting approaches. This
work leveraged multiple linear regression (MLR) and deep neural networks (DNNs) in ML,
for enforcing rainfall forecasting approaches and assessing the accuracy level of rainfall
forecasting. The Hadoop Spark distributed cluster-computing structure is the big-data
technology employed. Samad et al. [17] utilized an LSTM-related RNN for forecasting
rainfall. Standard datasets were employed for the testing and training of the developed
method. The time series rainfall datasets were pre-processed through Additive Seasonal
Decomposition to enhance the prediction analysis. The preprocessed datasets were then
put through the method. ANN was applied for benchmarking the LSTM method. In spite
of the several models existing in earlier studies, there is still a need to enhance the weather
forecasting performance. At the same time, most of the existing works do not focus on the
parameter-tuning process. The parameters in the classification model mainly influence its
overall performance in the rainfall prediction process. Since the trial and error method
for parameter tuning is a tedious and erroneous process, metaheuristic algorithms can be
applied. At the same time, the FCM parameters can affect the performance of the fuzzy
system irrespective of the significance. Therefore, in this work, MBOA is applied for the
parameter optimization of the FCM model.

3. The Proposed Model


In this article, we have introduced a new FCMM-RPS technique for predicting rainfall
accurately. The major aim of the FCMM-RPS technique is to forecast rainfall routinely and
efficiently. It follows a three-step process: data pre-processing, FCM-based prediction, and
MBOA-based parameter tuning. Figure 1 depicts the workflow of the FCMM-RPS system.

3.1. Data Pre-Processing


The presented FCMM-RPS technique primarily pre-processes the rainfall data to make
it compatible. Initially, the data cleaning process takes place where the missing values in
the dataset are replaced by the mean method. Then, normalization is applied to convert the
data into a scalar format. In this work, min–max normalization [18] is used to normalize the
input data into the range of 0 to 1. By assuming feature X, such that it contains a mapping
from the dataset among Xmin and Xmax , min–max normalization ( Xnorm ) is attained by the
following:
X − Xmin
Xnorm = , (1)
Xmax − Xmin
15, 25 Sustainability 2023, 15, 25 4 of 17
4 of 16

Figure 1. Workflow Figure


of FCMM-RPS
1. Workflowsystem.
of FCMM-RPS system.

3.2. Rainfall Prediction using FCM Model


3.1. Data Pre-Processing
In this study, the presented FCMM-RPS technique predicts rainfall using the FCM
The presented FCMM-RPS
model. technique
In the classification primarily
method, pre-processes
the weather data is passedtheinto rainfall data for
the FCM model to the
make it compatible. Initially,
prediction the data
process. FCMcleaning
is regardedprocess takes
as an RNN, place interpretability
utilizing where the missing featuresval-
that are
ues in the dataset are replaced by the mean method. Then, normalization is applied toenti-
widely applied in modeling tasks [19]. They encompass a group of neural processing
ties called concept (neuron) and causal relationships. The activation value of these neurons
convert the data into a scalar format. In this work, min–max normalization [18] is used to
usually takes values in the range of zero and one; thus, the stronger the activation value,
normalize the input data into
the greater its the range
effects ofmodel.
on the 0 to 1.Connected
By assuming
weightfeature 𝑋𝑋, such
is pertinent thatsystems.
in these it con-The
tains a mapping power fromofthe dataset
the causal among between
relationships 𝑋𝑋min and 𝑋𝑋max
concepts , min–max
Ci and normalization
Cj are measured by wij ∈ [−1, 1]
(𝑋𝑋𝑛𝑛𝑛𝑛𝑟𝑟𝑟𝑟 ) is attainedarithmetical
by the following:
weight and signified by a causal edge from Ci to Cj . There exist three possible
types of causal relationships amongst neural processing units in FCM-based networks that
𝑋𝑋 − 𝑋𝑋tomin
state the impacts from a single neuron others, as shown below:
𝑋𝑋𝑛𝑛𝑛𝑛𝑛𝑛𝑛𝑛 = (1) in
the𝑋𝑋cause, Ci produces an increment (decrement)
• If wij > 0, a rise 𝑋𝑋 maxin −
(decrement)
min
impact Cj with intensity wij .

3.2. Rainfall Prediction using FCM Model


In this study, the presented FCMM-RPS technique predicts rainfall using the FCM
model. In the classification method, the weather data is passed into the FCM model for
Sustainability 2023, 15, 25 5 of 16

• If wij < 0, a rise (decrement) in the cause Ci produces a decrement (increment) in


neuron Cj with intensity wij .
• If wij = 0, there exists no causal relationships between Ci and Cj . These rules are
reiterated until a stopping condition is fulfilled. A new activation vector can be
evaluated at each step t and then a predetermined number of iterations [20]. The FCM
is stated to have converged if it obtains a fixed-point attractor, otherwise, the update
process ends after a maximum number of iterations T is accomplished.
!
M

( t +1) (t)
Ai = f w ji A j , i 6= j, (2)
j =1

where f (·) signifies monotonically non-reducing nonlinear functions exploited for clamping
the activation value of each neuron to the interval. For example, the trivalent function,
sigmoid variants, and bivalent function. Next, emphasize the sigmoid function since it has
demonstrated better prediction capabilities. In the study, a non-linear transfer function is
used where λ signifies the sigmoid slope and h denotes the offset. Several research workers
have discovered that these parameters are closely connected with network convergence.

1
f ( Ai ) = , (3)
1 + e − λ ( Ai − h )
These rules are chosen while upgrading the activation values of neuron that is not
influenced by the neural processing entities.
!
M
∑ w ji A j
( t +1) (t) (t)
Ai = f + Ai , i 6= j, (4)
j =1

An alternate adapted upgrading rule was introduced to avoid the conflicts that
emerged in the event of non-active neurons. The rescaled inference enables us to deal with
the scenario where there exist no data regarding the initial state of the neuron and helps to
avoid saturation problems.
!
M    
= f ∑ w ji 2A j − 1 + 2Ai − 1 , i 6= j,
( t +1) (t) (t)
Ai (5)
j =1

The model generates a similar output once the cognitive network has the capacity
to converge, and the activation number of neurons remains the same. Simultaneously, a
cyclic FCM generates various responses, with the exception of some states that are usually
produced. The last possible scenario is related to the chaotic configuration where the
network generates dissimilar state vectors.

3.3. Parameter Tuning Using MBOA


To enhance the rainfall prediction outcomes of the FCM model, the parameter op-
timization process is performed using the MBOA. BOA is based on the food-foraging
behaviors of butterflies and is applied as a searching agent to perform optimization in
BOA [21]. Butterflies have a sense receptor that is applied for smelling or sensing the odor
of food or flowers. These sense receptors are named chemoreceptors and are dispersed over
the butterfly’s body parts. The presented method assumes that the butterfly produces scent
or fragrance with certain power or intensity. The fragrance that rises from the butterfly
is sensed by the different butterflies present in the neighborhood and an aggregate social
learning scheme is framed. This fragrance is related to the fitness of the butterfly, which is
evaluated by the objective function. This represents that when the butterfly moves around
in the searching region, the fitness could have similarly changed. When the butterfly is
unable to detect the scent of others in the searching space, then it makes random strides
and 1this is named a local searching technique. Then, when the butterfly senses fragrance
social learning scheme is framed. This fragrance is related to the fitness o
which is evaluated by the objective function. This represents that when
moves around in the searching region, the fitness could have similarly chan
butterfly is unable to detect the scent of others in the searching space, then
dom strides and 1this is named a local searching technique. Then, when
Sustainability 2023, 15, 25 6 of 16

senses fragrance from the optimum butterfly in the search space, it moves t
timum
from butterflies,
the optimum which
butterfly in theis named
search a itglobal
space, moves searching technique
toward the optimum and can be
butterflies,
follows:
which is named a global searching technique and can be formulated as follows:

p f i = cI a , (6)
𝑝𝑝𝑓𝑓𝑖𝑖 = 𝑐𝑐𝐼𝐼𝑎𝑎 ,
In Equation (6), c represents the sensory modality, a characterizes the power exponent
In modality
based on Equation that(6), 𝑐𝑐 represents
is accountable the sensory
for distinct modality,p f𝑎𝑎i , characterize
levels of absorption, characterizes th
nent
the basedmagnitude
perceived on modality that
of scent viz.,ishow
accountable
strongly the for distinct
fragrance of i levels
th
of absorptio
butterflies are
terize the perceived magnitude of scent viz., how strongly the fragrance of
perceived by other butterflies present in the region, and I shows the stimulus intensity.
Figure 2 demonstrates the steps involved in BOA.
are perceived by other butterflies present in the region, and 𝐼𝐼 shows the s
t +1
sity. Figure 2 demonstratesxthe steps
i t +1 = xit + Finvolved
i , in BOA. (7)

Figure
Figure 2. Steps
2. Steps involved
involved in BOA. in BOA.

𝑥𝑥𝑖𝑖 𝑡𝑡+1 = 𝑥𝑥𝑖𝑖 𝑡𝑡 + 𝐹𝐹𝑖𝑖𝑡𝑡+1 ,

Now, 𝐹𝐹𝑖𝑖 represents the fragrance that is used by 𝑥𝑥𝑖𝑖𝑡𝑡ℎ butterflies to up


sition during iteration and 𝑥𝑥𝑖𝑖𝑡𝑡 signifies the solution vector 𝑥𝑥𝑖𝑖 for 𝑖𝑖𝑡𝑡ℎ butte
ation count. Furthermore, there exist two major stages, global and local
Sustainability 2023, 15, 25 7 of 16

Now, Fi represents the fragrance that is used by xith butterflies to upgrade the position
during iteration and xit signifies the solution vector xi for ith butterflies at t iteration count.
Furthermore, there exist two major stages, global and local search stages. During the global
search technique, the butterfly takes a step toward the appropriate solution or butterfly g∗
in the following:  
Fit+1 = r2 × g∗ − xit × p f i , (8)

In Equation (8), g∗ represents the existing optimum solution amongst the existing
iterations, p f i denotes the perceived fragrance of ith butterflies, and r shows the random
number ranges from zero to one:
 
Fit+1 = r2 × x jt − xkt × p f i , (9)

In Equation (9), x jt and xkt characterize jth and kth butterflies from the solution space.
If x jt and xkt belong to a similar population and r represents the random number ranges
from zero to one. A switching possibility p is employed in BOA for switching from
global searching to intensive local searching. The pseudocode of BOA is demonstrated in
Algorithm 1.

Algorithm 1: Pseudocode for BOA


The main function f(x), x = ( x1 , x2 xd )
Generate the population of n butterflies xi = (i = 1, 2 n)
Define the switch probabilities p, sensor modality c, and power exponents a
while ending criteria are not satisfied do
for every butterfly bf from the population do
Calculate the fragrance to bf based on Equation (6)
end for
Determine the optimal bf
for every butterfly bf from the population do
Generate the arbitrary value rand within 0 and 1
if rand < p then
Move near the optimal butterfly
else
Move arbitrarily based on Equations (7) and (9)
end if
Evaluate a novel butterfly
If the novel butterfly is optimal, upgrade it from the population
end for
Upgrade the value of c
Determine the existing global optimal butterfly
end while
Output the optimal solution.

In the MBOA, the BOA is integrated into the Levy Flight (LF) concept. The LF
monitors the rule of the Levy distribution of several arbitrary phenomena like random
walk, Brownian motion, and so on [22]. Presently, LF is frequently employed in intelligent
optimization. For instance, the BOA implements LF for updating the place. LF develops the
searching space, therefore it can be simpler to avoid premature convergence by introducing
LF into the MBO approach.
LF place upgrades to:
( 
x j (t) + α ⊕ Levy(λ) f x j (t) ≤ f (vi (t + 1))
x i ( t + 1) = , (10)
v i ( t + 1) f (χi (t)) > f (vi (t + 1))
Sustainability 2023, 15, 25 8 of 16

where xit defines the tth generation place of xi , ⊕ implies the dot multiplication, α de-
notes the step size control parameter, and Levy (λ) implies the arbitrary searching path
that fulfills:
Levy ∼ u = t−λ , 1 < λ ≤ 3, (11)
The step size observes the Levy distribution, and step size s is computed as:
µ
s= , (12)
|v|1/β

In which µ, v are normally distributed, determined as:


 
µ ∼ N 0, σµ2 , (13)
 
v ∼ N 0, σv2 , (14)

whereas  
πβ
(1 + β) sin 2
σµ = 1+ β 2 β −1
, (15)
2 β 2
σv = 1, (16)
In which β is generally a constant of 1.5.
The MBOA approach develops a fitness function (FF) for realizing superior classifier
results. It defines a positive integer for exemplifying the good efficiency of candidate
solutions. During this work, the minimized classifier error rate assumes that FF is expressed
in Equation (17).

number o f misclassi f ied samples


f itness( xi ) = ∗ 100, (17)
Total number o f samples

4. Experimental Validation
The proposed model is simulated using Python tool. The rainfall prediction results
of the FCMM-RPS model are tested using a dataset [11] comprising 25,919 samples under
two classes, as defined in Table 1. The dataset consists of 25,919 instances and 11 features,
out of which 10 features are independent and 1 is dependent (output class). The features
are temperature (◦ C), atmospheric pressure (weather station), atmospheric pressure (sea
level), pressure tendency, relative humidity (%), mean wind speed, minimum temperature,
maximum temperature, visibility (km), and dew point temperature (◦ C). Further, the dataset
is preprocessed to improve the quality of the rainfall data over two days. Initially, the
missing values in the data are replaced by the mean method. Next, min–max normalization
is used to scale the data into a uniform scale of [0, 1].

Table 1. Dataset details.

Class No. of Samples


Positive (rainfall) 23,682
Negative (no rainfall) 2237
Total Number of Samples 25,919

The performance measures


 used to examine the rainfall prediction are defined as follows.
Accuracy Accuy represents the number of correctly classified instances to the total
number of instances.
TP + TN
Accuy = (18)
TP + TN + FP + FN
Sustainability 2023, 15, 25 9 of 16

Precision (Precn ) is defined as the ratio of properly classified positive samples to the
total number of classified positive samples.

TP
Precn = (19)
TP + FP
The recall (Recal ) is calculated as the ratio between the number of positive samples
correctly classified as positive to the total number of positive samples.

TP
Recal = (20)
TP + FN
The F-score (Fscore ) is the harmonic mean of a system’s precision and recall values. It
can be calculated by the following formula:

Precn ∗ Recal
 
Fscore = 2 ∗ (21)
Precn + Recal

The negative predictive value (NPV) is the proportion of negatively classified cases
that were truly negative.
TN
NPV = (22)
TN + FN
The confusion matrices of the FCMM-RPS model on the weather prediction process
under training (TR) and testing (TS) data are illustrated in Figure 3. The results reported
that the FCMM-RPS model has properly identified the positive and negative classes of
rainfall prediction in all cases.
Table 2 reports the overall rainfall prediction results of the FCMM-RPS model on 70%
of TR and 30% of TS databases. Figure 4 offers a brief rainfall prediction performance of the
FCMM-RPS model on 70% of the TR database. The figure highlights that the FCMM-RPS
model has categorized all the samples under positive and negative classes. It is observed
that the FCMM-RPS model has obtained an average accubal of 94.75%, precn of 93.13%,
recal of 94.75%, Fscore of 93.92%, and NPV of 93.13%.

Table 2. Rainfall prediction outcomes of FCMM-RPS system on 70:30 of TR/TS databases.

Class Accuracybal Precision Recall F-Score NPV


Training Phase (70%)
Positive 98.77 99.15 98.77 98.96 87.12
Negative 90.73 87.12 90.73 88.89 99.15
Average 94.75 93.13 94.75 93.92 93.13
Testing Phase (30%)
Positive 99.05 98.92 99.05 98.99 90.52
Negative 89.39 90.52 89.39 89.95 98.92
Average 94.22 94.72 94.22 94.47 94.72
Sustainability 2022, 15, 25 10 of 17
Sustainability 2023, 15, 25 10 of 16

Figure 3. Confusion
Figure matrices
3. Confusion matricesofofthe
theFCMM-RPS
FCMM-RPS system. (a,b)TR
system. (a,b) TRand
andTSTS databases
databases of 70:30
of 70:30 andand (c,d
TR and TS databases of 60:40.
(c,d) TR and TS databases of 60:40.

Table 2 reports the overall rainfall prediction results of the FCMM-RPS model on 70%
of TR and 30% of TS databases. Figure 4 offers a brief rainfall prediction performance of
the FCMM-RPS model on 70% of the TR database. The figure highlights that the FCMM-
RPS model has categorized all the samples under positive and negative classes. It is ob-
served that the FCMM-RPS model has obtained an average 𝑎𝑎𝑎𝑎𝑎𝑎𝑢𝑢𝑏𝑏𝑏𝑏𝑏𝑏 of 94.75%, 𝑝𝑝𝑝𝑝𝑝𝑝𝑐𝑐𝑛𝑛 of
93.13%, 𝑟𝑟𝑟𝑟𝑟𝑟𝑎𝑎𝑙𝑙 of 94.75%, 𝐹𝐹𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 of 93.92%, and NPV of 93.13%.
Negative 90.73 87.12 90.73 88.89 99.15
Average 94.75 93.13 94.75 93.92 93.13
Testing Phase (30%)
Positive 99.05 98.92 99.05 98.99 90.52
Sustainability 2023, 15, 25 Negative 89.39 90.52 89.39 89.95 98.92
11 of 16
Average 94.22 94.72 94.22 94.47 94.72

Figure 4. Average analysis of FCMM-RPS system on 80% of TR database.

Figure 5 provides the brief rainfall prediction performance of the FCM


Figure 4. Average analysis of FCMM-RPS system on 80% of TR database.
on 30%
Figure of theanalysis
4. Average TS database.
of FCMM-RPSThe figure
system on 80%emphasized
of TR database. that the FCMM-RPS ap
egorized all the samples under positive and negative
Figure 5 provides the brief rainfall prediction performance of the FCMM-RPS method
Figure classes. It is clear t
on 30% of 5the
provides the briefThe
TS database. rainfall prediction
figure performance
emphasized that the of the FCMM-RPS
FCMM-RPS method
approach has
RPS
on 30%system
of theall
categorized TSthe has acquired
database.
samplesThe figure
under an
positive average
emphasized that 𝑎𝑎𝑎𝑎𝑎𝑎𝑢𝑢
and negative the FCMM-RPS
𝑏𝑏𝑏𝑏𝑏𝑏
classes. It of
is 94.22%,
approach
clear that 𝑝𝑝𝑝𝑝𝑝𝑝𝑐𝑐
has
the cat-
FCMM- 𝑛𝑛 of 94
egorized all the samples under positive and negative classes. It is clear that the FCMM-
94.22%,
RPS system 𝐹𝐹𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 of 94.47%,
has acquired andaccu
an average NPV bal ofof 94.72%.
94.22%, precn of 94.72%, recal of 94.22%,
RPS
Fscoresystem
of 94.47%, has and
acquired
NPV ofan94.72%.
average 𝑎𝑎𝑎𝑎𝑎𝑎𝑢𝑢𝑏𝑏𝑏𝑏𝑏𝑏 of 94.22%, 𝑝𝑝𝑝𝑝𝑝𝑝𝑐𝑐𝑛𝑛 of 94.72%, 𝑟𝑟𝑟𝑟𝑟𝑟𝑎𝑎𝑙𝑙 of
94.22%, 𝐹𝐹𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 of 94.47%, and NPV of 94.72%.

Figure 5. Average analysis of FCMM-RPS system on 70% of TR database.

Figure 5. Average analysis of FCMM-RPS system on 70% of TR database.


Figure 5. Average analysis of FCMM-RPS system on 70% of TR database.
Table 3 demonstrates the overall rainfall prediction outcomes of the FCMM-RPS
algorithm on 60% of the TR database and 40% of the TS database. Figure 6 provides a brief
rainfall prediction performance of the FCMM-RPS approach on 60% of the TR database.
The figure shows that the FCMM-RPS method categorized all the samples into positive and
negative classes. It is shown that the FCMM-RPS approach has attained an average accubal
of 92.58%, precn of 96.19%, recal of 92.58%, Fscore of 94.30%, and NPV of 96.19%.
Sustainability 2022, 15, 25 12 of 17

Table 3 demonstrates the overall rainfall prediction outcomes of the FCMM-RPS al-
gorithm on 60% of the TR database and 40% of the TS database. Figure 6 provides a brief
Sustainability 2023, 15, 25 rainfall prediction performance of the FCMM-RPS approach on 60% of the TR database. 12 of 16
The figure shows that the FCMM-RPS method categorized all the samples into positive
and negative classes. It is shown that the FCMM-RPS approach has attained an average
𝑎𝑎𝑎𝑎𝑎𝑎𝑢𝑢𝑏𝑏𝑏𝑏𝑏𝑏 of 92.58%, 𝑝𝑝𝑝𝑝𝑝𝑝𝑐𝑐𝑛𝑛 of 96.19%, 𝑟𝑟𝑟𝑟𝑟𝑟𝑎𝑎𝑙𝑙 of 92.58%, 𝐹𝐹𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 of 94.30%, and NPV of
Table 3. Rainfall prediction outcome of FCMM-RPS system on 60:40 of TR/TS databases.
96.19%.
Class Accuracy Precision Recall F-Score NPV
Table 3. Rainfall prediction outcome
bal
of FCMM-RPS system on 60:40 of TR/TS databases.
Training Phase (60%)
Class Accuracybal Precision Recall F-Score NPV
Positive 99.45 98.64 99.45 99.04 93.75
Training Phase (60%)
Positive
Negative 99.45
85.71 98.64
93.75 99.45
85.71 99.04
89.55 93.75 98.64
Negative
Average 85.71
92.58 93.75
96.19 85.71
92.58 89.55
94.30 98.64 96.19
Average 92.58 96.19 92.58 94.30 96.19
Testing Phase (40%)
Testing Phase (40%)
Positive 99.49 98.59 99.49 99.04 93.89
Positive 99.49 98.59 99.49 99.04 93.89
Negative
Negative 84.52 93.89
93.89 84.52
84.52 88.96
88.96 98.59 98.59
Average
Average 92.01
92.01 96.24
96.24 92.01
92.01 94.00
94.00 96.24 96.24

Figure
Figure 6. 6. Average
Average analysis
analysis of FCMM-RPS
of FCMM-RPS system
system on 60%on
of60% of TR database.
TR database.
Figure 7 depicts a brief rainfall prediction performance of the FCMM-RPS methodology
Figure 7 depicts a brief rainfall prediction performance of the FCMM-RPS methodol-
on 40% of the TS database. The figure reveals that the FCMM-RPS method has categorized
ogy on 40% of the TS database. The figure reveals that the FCMM-RPS method has cate-
all the samples under positive and negative classes. It is detected that the FCMM-RPS
Sustainability 2022, 15, 25 gorized all the samples under positive and negative classes. It is detected that 13 theofFCMM-
17
RPS system has gained an average 𝑎𝑎𝑎𝑎𝑎𝑎𝑢𝑢𝑏𝑏𝑏𝑏𝑏𝑏 of 92.01%, 𝑝𝑝𝑝𝑝𝑝𝑝𝑐𝑐𝑛𝑛 of 96.24%, 𝑟𝑟𝑟𝑟𝑟𝑟𝑎𝑎𝑙𝑙 of 92.01%, Fscore of
system has gained an average accu bal of 92.01%, prec n of 96.24%, reca l of 92.01%,
94%,of
𝐹𝐹𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 and NPV
94%, andof 96.24%.
NPV of 96.24%.

Figure
Figure 7. Average
7. Average analysis
analysis of FCMM-RPS
of FCMM-RPS system
system on 40% of on 40% of TS database.
TS database.

The training accuracy (TACC) and validation accuracy (VACC) of the FCMM-RPS
approach are examined on rainfall prediction performance in Figure 8. The figure shows
that the FCMM-RPS methodology has exhibited enhanced performance with maximal
values of TACC and VACC. It is observable that the FCMM-RPS approach has reached
Figure 7. Average analysis of FCMM-RPS system on 40% of TS database.

The training accuracy (TACC) and validation accuracy (VACC) of the FCMM-RPS
Sustainability 2023, 15, 25 approach are examined on rainfall prediction performance in Figure 8. The figure shows
13 of 16
that the FCMM-RPS methodology has exhibited enhanced performance with maximal
values of TACC and VACC. It is observable that the FCMM-RPS approach has reached
maximal TACC outcomes.
The training accuracy (TACC) and validation accuracy (VACC) of the FCMM-RPS
The training loss (TLS) and validation loss (VLS) of the FCMM-RPS methodology are
approach are examined on rainfall prediction performance in Figure 8. The figure shows
tested on rainfall prediction performance in Figure 9. The figure shows that the FCMM-
that the FCMM-RPS methodology has exhibited enhanced performance with maximal
RPS algorithm has better performance with minimal values of TLS and VLS. It is noticea-
values of TACC and VACC. It is observable that the FCMM-RPS approach has reached
ble that the FCMM-RPS system has resulted in lesser VLS outcomes.
maximal TACC outcomes.

Figure
Figure 8.
8. TACC
TACC and
and VACC
VACC analysis of FCMM-RPS system.

The training loss (TLS) and validation loss (VLS) of the FCMM-RPS methodology are
Sustainability 2022, 15, 25
tested on rainfall prediction performance in Figure 9. The figure shows that the FCMM-RPS
14 of 17
algorithm has better performance with minimal values of TLS and VLS. It is noticeable that
the FCMM-RPS system has resulted in lesser VLS outcomes.

Figure
Figure9.9.TLS
TLSand
andVLS
VLSanalysis
analysisof
ofFCMM-RPS
FCMM-RPSsystem.
system.

An obvious precision–recall investigation of the FCMM-RPS approach on a test da-


tabase is described in Figure 10. The figure reveals that the FCMM-RPS system has re-
sulted in higher values of precision–recall values in various classes.
Sustainability 2023, 15, 25 14 of 16
Figure 9. TLS and VLS analysis of FCMM-RPS system.

An
An obvious
obviousprecision–recall
precision–recallinvestigation
investigationofof
thethe
FCMM-RPS
FCMM-RPS approach on aon
approach test
a da-
test
tabase is described in Figure 10. The figure reveals that the FCMM-RPS system
database is described in Figure 10. The figure reveals that the FCMM-RPS system has has re-
sulted in higher values of precision–recall values in various classes.
resulted in higher values of precision–recall values in various classes.

Figure
Figure 10.
10. Precision–recall
Precision–recall analysis
analysis of
of FCMM-RPS
FCMM-RPS system.
system.

Table 4 represent detailed results of the FCMM-RPS model with recent models [11].
Table 4 represent detailed results of the FCMM-RPS model with recent models [11].
The results show the enhanced outcomes of the FCMM-RPS model under all measures.
The results show the enhanced outcomes of the FCMM-RPS model under all measures.
Based on accu , the FCMM-RPS model has obtained a higher accu of 94.22% while the
Based on 𝑎𝑎𝑎𝑎𝑎𝑎𝑢𝑢y𝑦𝑦 , the FCMM-RPS model has obtained a higher 𝑎𝑎𝑎𝑎𝑎𝑎𝑢𝑢𝑦𝑦y of 94.22% while the
FCM, decision tree (DT), Naïve Bayes (NB), K-nearest neighbor (KNN), support vector
FCM, decision tree (DT), Naïve Bayes (NB), K-nearest neighbor (KNN), support vector
machine (SVM), and fused ML models have attained lower accuy values of 93.99%, 92.53%,
machine (SVM), and fused ML models have attained lower 𝑎𝑎𝑎𝑎𝑎𝑎𝑢𝑢𝑦𝑦 values of 93.99%,
90.37%,92.93%, 93.30%, and 93.94%, respectively. Meanwhile, with respect to precn , the
92.53%, 90.37%,92.93%, 93.30%, and 93.94%, respectively. Meanwhile, with respect to
FCMM-RPS algorithm has gained a superior precn of 94.72% while the FCM, DT, NB, KNN,
SVM, and fused ML approaches have reached minimal precn values of 85.45%, 69.49%,
40.98%, 77.25%, 72.10%, and 84.03%, respectively. Furthermore, in terms of negative
predictive value (NPV), the FCMM-RPS algorithm has obtained an enhanced NPV of
94.72% while the FCM, DT, NB, KNN, SVM, and fused ML systems have attained decreased
NPVs of 94.54%, 93.62%, 93.62%, 93.47%, 93.07%, and 94.20%, respectively. These results
assure the enhanced performance of the FCMM-RPS model. The enhanced performance
of the proposed model is due to the parameter-tuning process by MBOA. In addition, the
data preprocessing including missing value removal and data normalization process helps
to improve the quality of the input rainfall data. Further, the advantages of the FCM model
and MBOA include an improved rainfall prediction process over other existing models.

Table 4. Comparative analysis of FCMM-RPS system with existing approaches [11].

Methods Accuracy Precision NPV


FCMM-RPS 94.22 94.72 94.72
FCM 93.99 85.45 94.54
Decision tree [23] 92.53 69.49 93.62
Naïve Bayes [23] 90.37 40.98 93.47
KNN [23] 92.93 77.25 91.37
SVM [11] 93.30 72.10 93.07
Fused ML [11] 93.94 84.03 94.20
Sustainability 2023, 15, 25 15 of 16

5. Conclusions
In this article, we have introduced a new FCMM-RPS technique for predicting rainfall
accurately. The major aim of the FCMM-RPS technique is to forecast rainfall routinely and
efficiently. The presented FCMM-RPS technique primarily preprocessed the rainfall data
to make it compatible. In addition, the presented FCMM-RPS technique predicts rainfall
using the FCM model. To enhance the rainfall prediction outcomes of the FCM model,
the parameter optimization process was performed using the MBOA. The performance
assessment of the FCMM-RPS technique was tested on a rainfall dataset. A widespread
comparison study highlighted the improvements of the FCMM-RPS technique in the
rainfall forecasting process compared to existing techniques with a maximum accuracy of
94.22%. Thus, the presented FCMM-RPS technique can be employed for automated rainfall
forecasting in real time. In the future, the prediction accuracy can be boosted by the use
of sensor and meteorological datasets with additional different environmental features.
Hence, in future work, big data analysis can be used for rainfall prediction if the sensor
and meteorological datasets are used for the daily rainfall amount prediction study.

Author Contributions: Conceptualization, M.A.D. and I.Y.; Methodology, J.S.A. and M.I.A.; Software,
A.S.Z. and I.Y.; Validation, H.G.M., J.S.A., M.M., I.Y. and M.I.A.; Formal analysis, R.A.; Investigation,
A.S.Z.; Resources, M.M. and M.I.A.; Data curation, R.A. and M.M.; Writing—original draft, M.A.D.,
H.G.M., J.S.A. and R.A.; Writing—review & editing, A.S.Z., I.Y. and M.I.A.; Visualization, M.M.;
Project administration, M.A.D.; Funding acquisition, H.G.M. All authors have read and agreed to the
published version of the manuscript.
Funding: Princess Nourah bint Abdulrahman University Researchers Supporting Project number
(PNURSP2022R140), Princess Nourah bint Abdulrahman University, Riyadh, Saudi Arabia. The
authors would like to thank the Deanship of Scientific Research at Umm Al-Qura University for
supporting this work by Grant Code: 22UQU4340237DSR60.
Institutional Review Board Statement: This article does not contain any studies with human partic-
ipants performed by any of the authors. Not applicable.
Informed Consent Statement: Not applicable.
Data Availability Statement: Data sharing is not applicable to this article as no datasets were
generated during the current study.
Conflicts of Interest: The authors declare that they have no conflict of interest. The manuscript was
written through the contributions of all authors. All authors have given approval for the final version
of the manuscript.

References
1. Reddy, P.C.S.; Yadala, S.; Goddumarri, S.N. Development of rainfall forecasting model using machine learning with singular
spectrum analysis. IIUM Eng. J. 2022, 23, 172–186. [CrossRef]
2. Basha, C.Z.; Bhavana, N.; Bhavya, P.; Sowmya, V. Rainfall prediction using machine learning & deep learning techniques. In
Proceedings of the 2020 International Conference on Electronics and Sustainable Communication Systems (ICESC), Coimbatore,
India, 4–6 July 2020; pp. 92–97.
3. Fayaz, S.A.; Zaman, M.; Butt, M.A. Knowledge discovery in geographical sciences—A systematic survey of various machine
learning algorithms for rainfall prediction. In International Conference on Innovative Computing and Communications; Khanna, A.,
Gupta, D., Bhattacharyya, S., Hassanien, A.E., Anand, S., Jaiswal, A., Eds.; Springer: Singapore, 2022; pp. 593–608.
4. Ridwan, W.M.; Sapitang, M.; Aziz, A.; Kushiar, K.F.; Ahmed, A.N.; El-Shafie, A. Rainfall forecasting model using machine
learning methods: Case study Terengganu, Malaysia. Ain Shams Eng. J. 2021, 12, 1651–1663. [CrossRef]
5. Moon, S.H.; Kim, Y.H.; Lee, Y.H.; Moon, B.R. Application of machine learning to an early warning system for very short-term
heavy rainfall. J. Hydrol. 2019, 568, 1042–1054. [CrossRef]
6. Diez-Sierra, J.; Del Jesus, M. Long-term rainfall prediction using atmospheric synoptic patterns in semi-arid climates with
statistical and machine learning methods. J. Hydrol. 2020, 586, 124789. [CrossRef]
7. Hussein, E.A.; Ghaziasgar, M.; Thron, C.; Vaccari, M.; Jafta, Y. Rainfall Prediction Using Machine Learning Models: Literature
Survey. In Artificial Intelligence for Data Science in Theory and Practice; Alloghani, M., Thron, C., Subair, S., Eds.; Springer:
Berlin/Heidelberg, Germany, 2022; pp. 75–108.
8. Khan, M.I.; Maity, R. Hybrid deep learning approach for multi-step-ahead daily rainfall prediction using GCM simulations. IEEE
Access 2020, 8, 52774–52784. [CrossRef]
Sustainability 2023, 15, 25 16 of 16

9. Chao, Z.; Pu, F.; Yin, Y.; Han, B.; Chen, X. Research on real-time local rainfall prediction based on MEMS sensors. J. Sens. 2018,
2018, 6184713. [CrossRef]
10. Chhetri, M.; Kumar, S.; Pratim Roy, P.; Kim, B.G. Deep BLSTM-GRU model for monthly rainfall prediction: A case study of
Simtokha, Bhutan. Remote Sens. 2020, 12, 3174. [CrossRef]
11. Rahman, A.U.; Abbas, S.; Gollapalli, M.; Ahmed, R.; Aftab, S.; Ahmad, M.; Khan, M.A.; Mosavi, A. Rainfall Prediction System
Using Machine Learning Fusion for Smart Cities. Sensors 2022, 22, 3504. [CrossRef] [PubMed]
12. Pathan, M.S.; Nag, A.; Dev, S. Efficient rainfall prediction using a dimensionality reduction method. In Proceedings of the
IGARSS 2022—2022 IEEE International Geoscience and Remote Sensing Symposium, Kuala Lumpur, Malaysia, 17–22 July 2022;
pp. 6737–6740.
13. Poornima, S.; Pushpalatha, M. Prediction of rainfall using intensified LSTM based recurrent neural network with weighted linear
units. Atmosphere 2019, 10, 668. [CrossRef]
14. He, R.; Zhang, L.; Chew, A.W.Z. Modeling and predicting rainfall time series using seasonal-trend decomposition and machine
learning. Knowl. Based Syst. 2022, 251, 109125. [CrossRef]
15. Kala, A.; Vaidyanathan, S.G. Prediction of rainfall using artificial neural network. In Proceedings of the 2018 International
Conference on Inventive Research in Computing Applications (ICIRCA), Coimbatore, India, 11–12 July 2018; pp. 339–342.
16. Wei, C.C.; Chou, T.H. Typhoon quantitative rainfall prediction from big data analytics by using the apache hadoop spark parallel
computing framework. Atmosphere 2020, 11, 870. [CrossRef]
17. Samad, A.; Gautam, V.; Jain, P.; Sarkar, K. An approach for rainfall prediction using long short term memory neural network. In
Proceedings of the 2020 IEEE 5th International Conference on Computing Communication and Automation (ICCCA), Greater
Noida, India, 30–31 October 2020; pp. 190–195.
18. Kosko, B. Fuzzy cognitive maps. Int. J. Man Mach. Stud. 1986, 24, 65–75. [CrossRef]
19. Kociołek, M.; Strzelecki, M.; Obuchowicz, R. Does image normalization and intensity resolution impact texture classification?
Comput. Med. Imaging Graph. 2020, 81, 101716. [CrossRef] [PubMed]
20. Behrooz, F.; Mariun, N.; Marhaban, M.H.; Mohd Radzi, M.A.; Ramli, A.R. Review of control techniques for HVAC systems—
Nonlinearity approaches based on Fuzzy cognitive maps. Energies 2018, 11, 495. [CrossRef]
21. Long, W.; Wu, T.; Xu, M.; Tang, M.; Cai, S. Parameters identification of photovoltaic models by using an enhanced adaptive
butterfly optimization algorithm. Energy 2021, 229, 120750. [CrossRef]
22. Dong, X.; Chu, T.; Huang, T.; Ji, Z.; Wu, S. Noisy Adaptation Generates Lévy Flights in Attractor Neural Networks. Adv. Neural
Inf. Process. Syst. 2021, 34, 16791–16804.
23. Gupta, D.; Ghose, U. A comparative study of classification algorithms for forecasting rainfall. In Proceedings of the 2015 4th
International Conference on Reliability, Infocom Technologies and Optimization (ICRITO) Trends and Future Directions, Noida,
India, 2–4 September 2015; pp. 1–6.

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual
author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to
people or property resulting from any ideas, methods, instructions or products referred to in the content.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy