Consensus algorithm for ensemble clusterings