Power-aware anomaly detection in smartphones: An analysis of on-platform versus externalized operation