Efficient Learning In Heterogeneous Internet Of Things Ecosystems