Improving the discovery of near-Earth objects with machine-learning methods