+ # tbl_lst.sort(key=lambda rel: rel[-2], reverse=True)
+
+ # Sort the table according to the classification
+ tbl_sorted = list()
+ for classification in ("regression", "outlier", "progression", "normal"):
+ tbl_tmp = [item for item in tbl_lst if item[4] == classification]
+ tbl_tmp.sort(key=lambda rel: rel[0])
+ tbl_sorted.extend(tbl_tmp)