Using Latent Knowledge to Improve Real-Time Activity Recognition for Smart IoT