title: Sklearn custom transformers: difference between using FunctionTransformer and subclassing TransformerMixin
body: <p>In order to do proper CV it is advisable to use pipelines so that same transformations can be applied to each fold in the CV. I can define custom  transformations by using either <code>sklearn.preprocessing.FunctionTrasformer</code> or by <code>subclassing sklearn.base.TransformerMixin</code>. Which one is the recommended approach? Why?</p>