Cosmic String Detection with Tree-Based Machine Learning