# Building Topic-Driven Virtual IoTs in a Multiple IoTs Scenario
## 6 Experiments
### Average Fraction of Merged C-Nodes and Analysis of Node Distribution in Virtual IoTs

Table 6: Average fraction of real IoTs involved in a virtual IoT against the size of MIoTs and queries used to generate the virtual IoTs (supervised approach). \begin{table}
\begin{tabular}{l c c} \hline \hline \multirow{2}{*}{**MIoT (Size)**} & \multicolumn{2}{c}{**Average Fraction of Merged C-Nodes**} \\ \cline{2-4}  & \(|Q|=1\) & \(|Q|=2\) & \(|Q|=4\) & \(|Q|=6\) & \(|Q|=8\) & \(|Q|=10\) \\ \hline \(\mathcal{M}_{1}\) (176) & 0.304 & 0.455 & 0.517 & 0.532 & 0.554 & 0.572 \\ \(\mathcal{M}_{2}\) (301) &  
In order to deepen this investigation, for each virtual IoT, we compared the distribution of its nodes against the real IoTs they belong to. Indeed, if almost all the nodes of a virtual IoT derive from only one real IoT, the information contribution provided by the virtual IoT would be very small because it would be analogous to the one provided by the corresponding real IoT. By contrast, if the nodes of a virtual IoT homogeneously derive from several real IoTs, then the knowledge it provides is really new, and this knowledge would be uncaptured and lost if the new IoT had not been extracted. On the basis of this reasoning, we evaluated the heterogeneity of the provenance of the various nodes of each virtual IoT (see below). For this purpose, we adapted the Herfindahl Index [63] to our context. This index is very used in several research fields of Economics from several decades; for instance, it is exploited to evaluate the concentration degree in an industry. In order to adapt the Herfindahl Index to our scenario, consider a MIoT \(\mathcal{M}\) consisting of \(s\) real IoTs \((\mathcal{R}_{1},\mathcal{R}_{2},\ldots,\mathcal{R}_{s})\). Consider, also, a virtual IoT \(\mathcal{V}_{j}\) derived by either the supervised or the unsupervised approach. Let \(n_{j}\) be the number of nodes of \(\mathcal{V}_{j}\) and let \(\frac{n_{j}}{n_{j}}\), \(1\leq k\leq s\), be the fraction of the nodes of \(\mathcal{V}_{j}\) belonging to \(\mathcal{R}_{k}\) (i.e., the \(k^{th}\) real IoT of the MIoT). The Herfindahl Index \(H_{j}\) of \(\mathcal{V}_{j}\) is defined as \(\sum_{k=1}^{s}\left(\frac{n_{j}}{n_{j}}\right)^{2}\). \(H_{j}\) ranges in the real interval \(\left[\frac{1}{s},1\right]\); the higher its value, the higher the concentration degree of the nodes of \(\mathcal{R}_{k}\) in \(\mathcal{V}_{j}\). Clearly, as previously pointed out, one property desired for our approach is the ability to construct virtual IoTs connecting nodes that belong to different real IoTs in such a way as to extract knowledge that would be lost otherwise. If we report this property to the Herfindahl Index, this implies to obtain a value of this index as lower as possible (Consider that, since we have six real IoTs in our MIoTs, the minimum value of the Herfindahl Index is \(\frac{1}{6}=0.167\).). We computed the average Herfindahl Index of the thematic IoTs returned by both the supervised and the unsupervised approaches by considering the ten MIoTs described in Section 6.2 and performing the same tasks illustrated therein. The obtained results are reported in Tables 8 and 9. These tables evidence that also the analysis based on object distribution and Herfindahl Index returns very satisfying results that confirm and strengthen those obtained by examining the average fraction of merged nodes involved in a virtual IoT. Interestingly, as for this parameter, we observe that the supervised approach returns excellent results, very close to the best ones. By contrast, the unsupervised approach returns good results, even if those returned by the supervised approach are better.