Representation learning for automated diagnosis and biomarker discovery in age-related macular degeneration