We introduce a new approach, based on machine learning, to estimate pre-eruptive temperatures and storage depths using clinopyroxene-melt pairs and clinopyroxene-only chemistry. The model is calibrated for magmas of a wide compositional range, it complements existing models, and it can be applied independently of tectonic setting. Additionally, it allows the identification of the main chemical exchange mechanisms occurring in response to pressure and temperature variations on the base of experimental data without a priori assumptions. After the validation process, performances are assessed with test data never used during the training phase. We estimate the uncertainty using the root-mean-square error (RMSE) and the coefficient of determination (R 2). The application of the best performing algorithm (trained in the range 0-40 kbar and 952-1882 K) to clinopyroxene-melt pairs from primitive to extremely differentiated magmas of both subalkaline and alkaline systems returns a RMSE on the order of 2.6 kbar and 40 K for pressure and temperature, respectively. We additionally present a melt-and temperature-independent clinopyroxene barometer in the range 0-40 kbar, characterized by a RMSE of the order of 3 kbar. Tested for tholeiitic compositions in the range 0-10 kbar, the melt-and temperature-independent clinopyroxene barometer has a RMSE of 1.7 kbar. We finally apply the proposed approach to clinopyroxenes from Iceland, providing new, independent, insights about pre-eruptive storage depths of Icelandic volcanoes. The general applicability of this model will promote the comparison between the architecture of plumbing systems across tectonic settings and facilitate the comparison between petrologic and geophysical studies.