A procedure for the detection of anomalous input-output patterns