High somatic cell counts (SCC) is associated with mastitis infection, in dairy herds, worldwide. This work describes Machine Learning (ML) techniques designed to improve the information offered to farmers on animals producing high SCCs according to particular herd profiles. The analysed population included 71 dairy farms in Asturias (Northern Spain) and a total of 2,407 lactating cows. Four sources of information were available: a) a questionnaire survey describing facilities, milking routines and management practices of the farms studied; b) dairy recording information; c) classification of the cows suspected of being healthy or subclinical mastitic according to farmers' expertise; and d) positive or negative scores with respect to the California Mastitis Test (CMT). The decimal logarithm of the SCC (linear score), lactation number, herd size, lactating cows per milker, milk urea concentration, number of clusters per milker and actual SCC are shown to be the most informative attributes for mimicking both farmers' expertise or CMT performance in order to identify animals producing persistently high SCCs in dairy herds. However, to improve the identification of cows suspected of being non-healthy, the system uses other information related to management and milking routines. Decision rules to predict CMT performance can provide useful, additional information to farmers to improve the management of dairy herds included in milk recording programs.