fit function

Fit a preprocessing pipeline