preProcess function

Compute a weighted sample from initial observations