IRESE: An intelligent rare-event detection system using unsupervised learning on the IoT edge