K-Nearest Neighbours Method as a Tool for Failure Rate Prediction

  • Małgorzata Kutyłowska Wroclaw University of Science and Technology, Faculty of Environmental Engineering, Wybrzeze St. Wyspianskiego 27, 50-370 Wroclaw, Poland


The paper shows the results of failure rate prediction using non-parametric regression algorithm K-nearest neighbours. The whole data set for years 1999-2013 was divided randomly into two groups (learning – 75% and testing – 25%). Besides, data from year 2014 were used for verifying the model. The dependent variable (failure rate) was forecasted on the basis of independent variables (number of installed house connections, total length and number of damages of water mains, distribution pipes and house connections). Four types of distance metric: Euclidean, quadratic Euclidean, Manhattan and Czebyszew were checked and four KNN models were created. Taking into consideration all constraints and assumptions, models using Euclidean and quadratic Euclidean distance metrics gave the most optimal prediction results. The optimal number of K nearest neighbours equalled to 2 and 3 concerning models KNN-E, KNN-E2, KNN-C and KNN-M, respectively. Validation error was the smallest for models KNN-E and KNN-E2 and amounted to 0.0130, for model KNN-M was equal to 0.0152 and for KNN-C to 0.0150.

Keywords: failure analysis, K-nearest neighbours, prediction, water-pipe network
Published online
How to Cite
Kutyłowska, M. (2018). K-Nearest Neighbours Method as a Tool for Failure Rate Prediction. Periodica Polytechnica Civil Engineering, 62(2), 318-322. https://doi.org/10.3311/PPci.10045
Research Article