Machine learning helps retrace evolution of classical music