fit_transform function

Fit and transform in a cross-validated manner.