Learning Connectedness