Adaptive choice of trimming proportions