Filter relations based on threshold