Self-Directed Learning of Convex Labelings on Graphs