Adaptive Stream Processing on Edge Devices through Active Inference