Using a transformer (estimator) to transform the target labels in sklearn.pipeline

前端 未结 3 675
天涯浪人
天涯浪人 2020-12-10 14:38

I understand that one can chain several estimators that implement the transform method to transform X (the feature set) in sklearn.pipeline. However I have a use case where

3条回答
  •  离开以前
    2020-12-10 15:29

    No, pipelines will always pass y through unchanged. Do the transformation outside the pipeline.

    (This is a known design flaw in scikit-learn, but it's never been pressing enough to change or extend the API.)

提交回复
热议问题