# Compressible Diagnosis of Membrane Fouling Based on Transfer Entropy
## 3 Methodology
### Simplification of Fault Propagation Topology  
FTT expresses the complex relationship between the variables, which will affect the search for the root causal variables of membrane fouling. Therefore, it is necessary to simplify this topology to identify the main impact relationships. When \(X\) and \(Y\) are disrupted, a new sequence is constructed as follows:  
\[\left\{ \begin{array}{l}X^{s}=\left[X_{i},X_{i+1},...,X_{i+M-1}\right]\\ Y^{s}=\left[Y_{i},Y_{j+1},...,Y_{j+M-1}\right]\end{array} \right., \tag{12}\]  
where \(M\) is the number of samples of the new sequence, and \(N\) is the total number of samples of the original sequence. The value range of \(i\) and \(j\) is [1, \(N-M+1\)]. The new sequence is a subset of the original sequence. The statistical characteristics in the stationary sequence are the same as those in the original sequence. To ensure no correlation between the two sequences, \(i\) and \(j\) need to meet \(\mid\)\(i\)\(-\)\(j\)\(\mid\)\(\mid\)\(\geq\)\(e\), where \(e\) is a sufficiently large integer. Then, the new sequence formula has two variables with a large time interval. It can be considered that the correlation between the two variables is eliminated by a large time interval. Thus, two variable sequences without causality are obtained. The transfer entropy \(te_{s}\) of the multiple sets of such new sequences are calculated and stored in \(NET\) with \(NET\) = [\(te_{1}\), \(te_{2}\),\(\ldots\), \(te_{s}\)]. Then, the significance threshold is calculated by  
\[S_{Y\to X}=\mu_{NET}+3\sigma_{NET}, \tag{13}\]  
where \(\mu_{NET}\) is the mean value of \(NET\) and \(\sigma_{NET}\) is the standard deviation of \(NET\). The greater difference in transfer entropy than the threshold value represents that there is a causal relationship between variables. To further simplify the fault transfer topology, an ICS based on a BIC score function is proposed. The designed ICS mainly includes two parts. First, the fitting degree is considered. Then, the complexity of the structure is reduced to avoid the decline in diagnosis accuracy caused by complex models and many other parameters. For the dataset \(D\) = [\(D_{1}\), \(D_{2}\), \(D_{3}\),\(\ldots\), \(D_{m}\)], \(m\) represents the size of the sample dataset. The logarithmic likelihood function of the parameter \(\theta\) can be expressed as follows:  
\[I(\theta|D)=\sum_{d=1}^{m}\log P(D_{1}|\theta)=\sum_{i=1}^{n}\sum_{j=1}^{q_{i} }\sum_{k=1}^{r_{i}}m_{ijk}\log\theta_{ijk}, \tag{14}\]  
where \(\theta\) =[\(\theta_{ijk}\)\(\mid\)\(i\) = 1, 2, \(\ldots\), \(n\), \(j\) = 1, 2, \(\ldots\), \(q_{i}\), \(k\) = 1, 2, \(\ldots\), \(r_{i}\)]. \(\theta_{ijk}\) represents the probability that the value of node \(X_{i}\) is \(k\) when the parent node value of node \(X_{i}\) is \(j\). \(q_{i}\) represents the total number of parent node set values of node \(X_{i}\), and \(q_{i}\) = 1 when node \(X_{i}\) has no parent node. \(r_{i}\) represents the number of possible value types of node \(X_{i}\), and \(m_{ijk}\) represents the number of samples that meet \(X_{i}\) = \(k\) and the parent node is \(j\) in \(D\). The ICS based on the BIC score function can be expressed as  
\[BIC(G|D)=I(\theta|D)-\sum_{i=1}^{n}\frac{q_{i}(r_{i}-1)}{2}\log m, \tag{15}\]  
Figure 3: Fault transfer topology. where \(BIC(G\,|\,D)\) represents the score for structure \(G\). Through ICS, the indirect connection of variables is scored to determine whether to delete. The presentation of the indirect connection is shown in Figure 4. Then, the simplified FTT is obtained after using ICS. The information relevance strategy is proposed to find the root causal variables. The main idea of information relevance is to select a node as the starting node arbitrarily and calculate the sum of the transfer entropy of the remaining paths. When the sum of transfer entropy has the maximum value, the variable represented by this node is the root causal variable.