## 5 Conclusions and Future Work  
This paper introduced an FC-based architecture approach that incorporates a mechanism for detecting outliers and another for inferring data intended to replace them. The evaluation demonstrated our approach's effectiveness in a real network deployed in a Colombian Smart Coffee Farm. For the failure detection mechanism, we selected the DBSCAN algorithm due to it presenting an excellent performance for marking outliers over all the tests with a FAR lower than 6%, a perfect Recall as well as an Accuracy, Precision, and F-Score greater than 99% for the most extensive dataset. We selected the linear interpolation for the failure recovery mechanism because it infers data with low RMSE allowing for replacing the detected outliers properly. Considering the obtained results, we concluded that the proposed approach is suitable for providing reliability in the IoT-based Smart Farming data collection process and supports the correct decision-making.  
Apart from that, our proposal falls behind in terms of power consumption analysis, architectures validation, or comparison, and optimal location of nodes per layer in the Fog Tier. As future work, we intend to involve more features into the dataset, such as humidity, pressure, and light. Furthermore, we plan to improve failure detection with the ability to differentiate outliers from events of interest.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & & **Accuracy** & **Recall** & **Precision** & **F-Score** & **FAR** \\ \hline \multirow{2}{*}{1\% Outliers} & DBSCAN (e = 0.1–0.2) & 99.99 & 100 & 99.99 & 99.99 & 1.33 \\  & IF (c = 0.02) & 98.98 & 98.97 & 100 & 99.48 & 0 \\  & SVM (nu = 0.02) & 99.02 & 99.01 & 100 & 99.50 & 0 \\ \hline \multirow{2}{*}{5\% Outliers} & DBSCAN (e = 0.1) & 99.78 & 100 & 99.77 & 99.89 & 0.44 \\  & IF (c = 0.06) & 98.90 & 98.94 & 100 & 99.42 & 0 \\  & SVM (nu = 0.07) & 97.89 & 97.78 & 100 & 98.88 & 0 \\ \hline \multirow{2}{*}{10\% Outliers} & DBSCAN (e = 0.1) & 99.46 & 100 & 99.41 & 99.70 & 5.6 \\  & IF (c = 0.1) & 99.57 & 99.52 & 100 & 99.76 & 0 \\ \multicolumn{2}{c}{SVM (nu = 0.1)} & 98.23 & 98.80 & 99.25 & 99.02 & 7.09 \\ \hline \hline \end{tabular}
\end{table}
Table 7: Comparison Per_Month dataset.  
Figure 4: Comparison interpolation.  
**Author Contributions**: Conceptualization, A.I.M.-M. and O.M.C.R.; Methodology, A.I.M.-M. and O.M.C.R.; Software, A.I.M.-M.; Validation, A.I.M.-M. and O.M.C.R.; Formal analysis, A.I.M.-M.; Investigation, A.I.M.-M.; Resources, A.I.M.-M. and O.M.C.R.; Data curation, A.I.M.-M.; Writing--original draft preparation, A.I.M.-M. and O.M.C.R.; Writing--review and editing, A.I.M.-M. and O.M.C.R.; Visualization, A.I.M.-M.; Supervision, O.M.C.R.; Project administration, O.M.C.R.; and Funding acquisition, O.M.C.R. All authors have read and agreed to the published version of the manuscript.  
**Acknowledgments:** The authors thank Innovacion-Cauca (SGR-Colombia) under project \"Alternativas Innovadoras de Agricultura Inteligente para sistemas productivos agricolas del departamento del Cauca soporado en entornos de IoT ID 4633-Convocatoria 04C-2018 Banco de Proyectos Conjuntos UEES-Sostenibilidad\", the Telematics Engineering research Group (GIT) of the Universidad del Cauca, and TECNICAFE.  
**Funding:** The research of Professor Ph.D. [PERSON] was funding by the Universidad del Cauca. The research of the Eng. [PERSON] was funding by the project \"Alternativas Innovadoras de Agricultura Inteligente para sistemas productivos agricolas del departamento del Cauca soporado en entornos de IoT ID 4633-Convocatoria 04C-2018 Banco de Proyectos Conjuntos UEES-Sostenibilidad\" of InnovAccion Cauca.  
**Conflicts of Interest**: The authors declare no conflict of interest.