Linear contour learning: a method for supervised dimension reduction