Data-driven Algorithm Selection and Parameter Tuning: Two Case studies in Optimization and Signal Processing