Dynamic Software Product Lines (DSPLs) are a well-accepted approach for self-adaptation at runtime. In the context of DSPLs, there are plenty of reactive approaches that apply countermeasures as soon as a context change happens, but they often imply making many reconfigurations, which makes the system more unstable. In this paper we propose a proactive approach, ProDSPL, that exploits an automatically learnt model of the system, which anticipates future variations of the system, and generates the best DSPL configuration that can soften the negative impact of future events on the quality requirements of the system. ProDSPL formulates the problem of the generation of dynamic reconfigurationas as a proactive controller over a prediction horizon, which includes a mapping of the valid configurations of the DSPL into linear constraints. Our approach is evaluated and compared against a reactive approach, DAGAME, based also on a DSPL, which uses a genetic algorithm to generate quasi-optimal feature model configurations at runtime. The evaluation with a mobile game and randomly generated feature models shows that ProDSPL gives good results with regard to the quality of the configurations generated that tries to anticipate future events and it always enforces the system to make the least possible reconfigurations.