parFilter takes function to generate probability instead of matrix