Computational Behaviour Modelling for the Internet of Things