Neural networks for railway hazard analysis