Created the one-against-all function in projet.