A cluster-graph model for herd characterisation in dairy farms equipped with an automatic milking system