## 3 TQWT-Based K-NN Entropy  
In this work, we have analyzed the signals using TQWT prior to the computation of K-NN. The TQWT is built with the help of the two-channel filter bank method. Let the low-pass and high-pass scale factors of the two-channel filter bank be denoted by \(\
u\) and \(\mu\), respectively. The low-pass filter frequency response is mathematically expressed as [43]:  
\[G_{0}(\omega)=\begin{cases}1,&\text{if }|\omega|\leq(1-\mu)\pi\\ \theta\left(\frac{\omega+(\mu-1)\pi}{\
u+\mu-1}\right),&\text{if }(1-\mu)\pi<| \omega|<\
u\pi\\ 0,&\text{if }\
u\pi\leq|\omega|\leq\pi\end{cases} \tag{4}\]  
Figure 2: Random signals with increasing weights of dominant low-frequency component and their K-NN entropy estimates.  
The high-pass filter frequency response can be formulated as [43]:  
\[G_{1}(\omega)=\begin{cases}0,&\text{if }|\omega|\leq(1-\mu)\pi\\ \theta\left(\frac{\
u\pi-\omega}{\
u+\mu-1}\right),&\text{if }(1-\mu)\pi<|\omega|<v\pi\\ 1,&\text{if }v\pi\leq|\omega|\leq\pi\end{cases} \tag{5}\]  
where \(\theta(\omega)\) is considered as the Daubechies filter frequency response [43]. The high-pass scale factor \((0\leq\mu\leq 1)\) and low-pass scale factor \((0\leq\
u\leq 1)\) are to be selected in order to follow the condition \(\
u+\mu>1\)[43].  
The \(Q\) and \(R\) of TQWT are mathematically expressed as:  
\[Q=\frac{2-\mu}{\mu};\;\;R=\frac{\mu}{1-\
u} \tag{6}\]  
Detailed mathematical expressions of \(Q\), \(R\), center frequency (\(f_{c}\)) and the bandwidth (\(B\)) of TQWT are provided in [43].  
The computation algorithm of \(Q\)-based entropy (QEn) can be summarized as follows:  
1. Sub-band signals denoted as \(s(n)\) are reconstructed by applying the inverse TQWT operation.
2. To measure the complexity at multiple oscillatory levels, K-NN entropy has been computed on the signals, generated by cumulatively summing the reconstructed sub-band signals. We have formulated two kinds of multilevel filtering approaches as follows: 1. Detailed sub-band to approximate sub-band: The multilevel filtering starts from the highest oscillatory level sub-band to the dominant low-frequency trend sub-band \((\text{QEn}_{\text{HL}})\). Finally, \(\text{QEn}_{\text{HL}}\) can be mathematically formulated as follows: \[\text{QEn}_{\text{HL}}(Q,R,\tau,l)=\text{K-NN entropy of }(\text{Recons}_{\text{HL}}^{\tau}(n),l);\;\;\tau=1\dots J\] (7) \[\text{Recons}_{\text{HL}}^{\tau}(n)=\sum_{j=1}^{\tau}s_{j}(n)\] (8) where \(j=1\) corresponds to highest oscillatory sub-band and \(j=J\) corresponds to the dominant low-frequency trend, \(\tau\) is the scale factor and \(l\) is the number of nearest neighbors. 2. Approximate sub-band to the detailed sub-band: The multilevel filtering starts from the dominant low-frequency trend sub-band to the highest oscillatory level sub-band \((\text{QEn}_{\text{LH}})\). Finally, \(\text{QEn}_{\text{LH}}\) can be expressed as follows: \[\text{QEn}_{\text{LH}}(Q,R,\tau,l)=\text{K-NN entropy of}(\text{Recons}_{\text{LH}}^{\tau}(n),l);\;\;\tau=1\dots J.\] (9) \[\text{Recons}_{\text{LH}}^{\tau}(n)=\sum_{j=1}^{\tau}s_{j}(n)\] (10) where \(j=1\) corresponds to the dominant low-frequency trend and \(j=J\) corresponds to the highest oscillatory sub-band, \(\tau\) denotes the scale factor and \(l\) represents number of nearest neighbors. In this work, we have set \(l=4\) for K-NN entropy estimation.  
In Figures 3 and 4, we have graphically presented the frequency responses of successive scale factors corresponding to different values of \(Q\) parameters for this operation. In these figures, S1, S2, and so on, represent Scale 1, Scale 2, and so on, respectively.