cluster log data with UPGMA