Learning From Heterogeneous Data