What is the purpose of the FunctionTransformer class in scikit-learn?

Data Science with Python Hard

Data Science with Python — Hard

What is the purpose of the FunctionTransformer class in scikit-learn?

Key points

  • FunctionTransformer wraps Python functions as scikit-learn transformers
  • Enables inclusion in Pipelines for data preprocessing
  • Facilitates applying custom transformations to data
  • Ensures compatibility with scikit-learn API

Ready to go further?

Related questions