Decentralised and collaborative machine learning framework for IoT