Advancing the search for gravitational waves using machine learning