The average energy curvature as a function of the particle number is a molecule-specific quantity, which measures the deviation of a given functional from the exact conditions of density functional theory. Related to the lack of derivative discontinuity in approximate exchange-correlation potentials, the information about the curvature has been successfully used to restore the physical meaning of Kohn-Sham orbital eigenvalues and to develop non-empirical tuning and correction schemes for density functional approximations. In this work, we propose the construction of a machine-learning framework targeting the average energy curvature between the neutral and the radical cation state of thousands of small organic molecules (QM7 database). The applicability of the model is demonstrated in the context of system-specific gamma-tuning of the LC-omega PBE functional and validated against the molecular first ionization potentials at equation-of-motion coupled-cluster references. In addition, we propose a local version of the non-linear regression model and demonstrate its transferability and predictive power by determining the optimal range-separation parameter for two large molecules relevant to the field of hole-transporting materials. Finally, we explore the underlying structure of the QM7 database with the t-SNE dimensionality-reduction algorithm and identify structural and compositional patterns that promote the deviation from the piecewise linearity condition.