Prediction of Risk of an Event Using Sensor Signals, with Application to the Prevention of Driving Accidents due to Drowsiness