Cluster, classify, regress: A general method for learning discontinuous functions | Synapse