Machine-learning based determination of gait events from foot-mounted inertial units