## 4 Evaluation
### Accuracy
\right)\prod p_{i}^{k} \tag{11}\]  
Let \(\sum_{i=1}^{c}k_{i}\leq\frac{n}{2}\), and the value of \(A\) is calculated using multinomial coefficients, which represent the number of ways to choose \(k_{i}\) voting nodes for each class \(i\), ensuring that the total sum of all \(k_{i}\) is equal to \(n\). The multi-class error (\(E\)) of the majority vote can be expressed as follows:  
\[E=1-A \tag{12}\]  
The number of voting nodes (\(n\)) in the majority voting model significantly influences both \(A\) and \(E\) in selecting the correct class label. As the number of voting nodes increases, the probability of the majority voting accurately also rises. In fact, the accuracy of majority voting is directly proportional to the number of participating nodes. Consequently, a greater number of nodes enhances the likelihood that the majority will make the correct decision. Conversely, \(E\) is inversely proportional to the number of participating nodes. Thus, with more voters involved in the process, the probability of an incorrect majority vote decreases. This holds true for both binary and multi-class classifications; as the number of voting nodes (\(n\)) increases, the terms involving n in the binomial and multinomial coefficients grow, resulting in higher \(A\) and lower \(E\) for the majority vote. The number of nodes participating in the voting process significantly influences \(A\) and \(E\) of the majority vote. Consequently, confidence (\(\alpha\)) can be modeled as a function of the number of voting nodes (\(n\)), which helps to quantify the certainty of the majority vote result. For binary classification, the value of \(\alpha\) can be determined using the following formula:  
\[\alpha=2*(1-\varphi\big{|}\frac{n}{2}-k\big{|},n,p)) \tag{13}\]  
where \(\varphi\) is the cumulative distribution function (CDF) of the standard normal distribution, \(k\) represents the number of voters for the majority class, \(n\) is the total number of voting nodes, and \(p\) denotes the individual accuracy of the voting nodes. The value of \(\alpha\) ranges from \(0\) to \(1\). Similarly, the formula for multi-class classification can be derived as follows:  
\[\alpha=2*(1-\varphi\big{|}\frac{n}{2}-\sum k_{i}\big{|},n,\sum p_{i})) \tag{14}\]  
where \(k_{i}\) is the number of voting nodes for class label \(i\) and \(p\) is the individual accuracy of the voting nodes for that class. The value of \(\alpha\) represents the confidence level, which is determined by how close the sum of the voters for the majority class is to half the total number of voters. Consequently, the further the sum is from \(\frac{n}{2}\), the higher the confidence. The following updates to Formulas (9)-(13) incorporate this confidence as follows:  
\[\hat{A}=A*\alpha \tag{15}\]\[\hat{E}=E*(1-\alpha) \tag{16}\]  
TFNN may not utilize all the nodes in the IoT network. Therefore, the following formula helps us to understand the accuracy achieved when using the entire network compared to the accuracy obtained when utilizing only a subset of nodes:  
\[A(N)=(1-\varphi(\left|\frac{N}{2}-k\right|,N,0.5)) \tag{17}\]  
\[A(n)=(1-\varphi(\left|\frac{n}{2}-k\right|,n,0.5)) \tag{18}\]  
For multi-class classification, the following formulas are applied, where \(k_{s,i}\) is the number of votes for class \(i\) in the sample \(n\). \[A(N)=1-\varphi(\left|\frac{N}{2}-\sum k_{i}\right|,N,\frac{1}{c})) \tag{19}\]  
\[A(n)=1-\varphi(\left|\frac{n}{2}-\sum k_{s,i}\right|,n,\frac{1}{c})) \tag{20}\]  
where \(N\) is the set of all nodes in the network and \(n\subseteq N\). For both binary and multi-class classification, the difference between using all nodes and using a subset of nodes is shown as follows:  
\[A_{diff}=A(N)-A(n) \tag{21}\]  
Equation (20) shows that as the sample \(n\) increases, \(A(n)\) will approach \(A(N)\), and the difference between the accuracy of using a sample subset and all nodes will diminish.