get_valid_subset function

Get the subset that satisfies the missing rate condition.