A computationally efficient electrocardiogram (ECG) quality classifier is developed. It is based on the residuals between filtered and observed data, and between the best subset linear predictions without the constant term and the filtered data. Amplitude information is also used. First, the ECG is filtered for essential spectrum bandpass and interference removal. Then, the prediction of each lead is derived only from the information present in three other leads at the same time instant. The prediction coefficients are determined from acceptable quality data using a robust method, and the best lead combinations are found using an exhaustive search. Trained for maximal accuracy, the classifier achieves 93.2 % accuracy, 96.9 % sensitivity, 80.4 % specificity, 94.5 % positive predictive value, and 88.3 % negative predictive value on training data (positive = acceptable; negative = unacceptable). External blind validation against test data yields an accuracy of 90.0 %.