Supervised and unsupervised machine learning of structural phases of polymers adsorbed to nanowires.