Guaranteeing safe online machine learning via reachability analysis