Cardiac contraction is the result of integrated cellular, tissue and organ function. Biophysical in silico cardiac models offer a systematic approach for studying these multi-scale interactions. The computational cost of such models is high, due to their multi-parametric and nonlinear nature. This has so far made it difficult to perform model fitting and prevented global sensitivity analysis (GSA) studies. We propose a machine learning approach based on Gaussian process emulation of model simulations using probabilistic surrogate models, which enables model parameter inference via a Bayesian history matching (HM) technique and GSA on whole-organ mechanics. This framework is applied to model healthy and aortic-banded hypertensive rats, a commonly used animal model of heart failure disease. The obtained probabilistic surrogate models accurately predicted the left ventricular pump function (R2 = 0.92 for ejection fraction). The HM technique allowed us to fit both the control and diseased virtual bi-ventricular rat heart models to magnetic resonance imaging and literature data, with model outputs from the constrained parameter space falling within 2 SD of the respective experimental values. The GSA identified Troponin C and cross-bridge kinetics as key parameters in determining both systolic and diastolic ventricular function.This article is part of the theme issue ‘Uncertainty quantification in cardiac and cardiovascular modelling and simulation’.