Data-driven diagnosis of spinal cord abnormalities