Designing From End-To-End And Learning Control Policies On The Edge With Data-Driven Optimization: Applications To Adaptive Plasma Medicine