Single-mode optical fibre decoder using polarization and a KNN algorithm