Machine learning-based identification of precursors of extreme events in chaotic systems