## 4 Performance Analysis
In general, the prediction of environmental changes using ML relies on patterns in the input data rather than the specific type of environmental  
Figure 4: The influence of the switching intensity \(\mu\) in FSO/RF hybrid systems decreases as the environmental instability increases. Figure 3: The improvement of the switching mechanism in hybrid FSO/RF systems reduces losses, but environmental instability increases them. change. ML models are trained on diverse datasets containing features such as visibility, humidity, temperature, or historical link performance, allowing them to recognize correlations and trends regardless of the cause. As a result, whether the change is due to fog, rain, or turbulence, the model focuses on predicting the impact on communication rather than the underlying phenomenon. The transition probabilities \(w_{f}\) and \(w_{r}\) constitute critical parameters of the proposed model, dictated by the specific environmental conditions of the application domain. These parameters extend beyond meteorological influences and encapsulate a broader spectrum of contextual factors. By employing dedicated submodels to compute \(w_{f}\) and \(w_{r}\), we can systematically incorporate the mobility dynamics and spatial configuration of both the receiver and transmitter, as well as the impact of diverse terrain types, including rural, suburban, and high-density urban environments [26]. User-driven parameter selection models, tailored to specific application tasks, enable a more nuanced and context-aware characterization of system dynamics. In general, transmission intensities can vary over a broad range, from 0 to infinity [40], leading to transmission probabilities approaching either 0 or 1. The parameters \(w_{f}\) and \(w_{r}\) can be determined analogously to those in the traditional Gilbert-Elliott (or Gilbert-Erasure) model. This allows for the collection of statistical data and leverages the fundamental property that, in a continuous-time Markov process, the waiting time in each state follows an exponential distribution. Consequently, transition rates can be estimated directly from empirical data by computing the mean residence times [27]. For the proposed four-state model, transmission intensities can be evaluated as follows. Let \(T_{x}\) denote that the duration a Markov chain remains in state \(x\), where \(x\in\{\text{FSO},\text{FSO}\rightarrow\text{RF},\text{RF},\text{RF}\rightarrow \text{FSO}\}\), and \(E[T_{x}]\) represent its expected value. Therefore,  
\[w_{f}=\frac{1}{E[T_{FSO}]+E[T_{RF\to FSO}]}\,\ \ \ \ \ w_{r}=\frac{1}{E[T_{RF}]+E[T_{FSO \to RF}]} \tag{22}\]  
The proposed model enables the optimization of hybrid FSO/RF systems. Let us consider the following optimization problem:  
\[\  
and  
\[\mu_{opt}=\frac{2w_{r}w_{f}}{w_{r}+w_{f}}l_{h}^{-1}-w_{r}-w_{f} \tag{25}\]  
Figure 5 demonstrates the behavior of \(\mu_{opt}\) as a function of the intensities characterizing the environmental dynamics. The formulas for state probabilities enable the development of a wide range of performance evaluation indicators, particularly those related to energy consumption assessment. Power consumption in hybrid FSO/RF communications is influenced by various factors, including the implementation of Automatic Repeat Request (ARQ) protocols, which increase energy usage due to retransmissions in high-error environments caused by adverse weather conditions [41]. Similarly, Forward Error Correction (FEC) introduces additional overheads from both computational processing and the transmission of redundant bits [42]. The network workload and topology are fundamental in estimating energy consumption, especially in IoT scenarios [43]. Even in relatively simple topologies, such as those employed for monitoring large-scale objects with linear wireless sensor networks, a diverse array of factors must be considered [44].