Search code examples
pythonscikit-learnpipelinepost-processing

Post-process classifier output in scikit learn Pipeline


I am using a Pipeline in scikit learn to group some preprocessing together with a OneClassSVM as the final classifier. To compute reasonable metrics, I need a post-processing which transforms the -1,1 output of the OneClassSVM to 0 and 1. Is there any structured way to add such post-processing to a Pipeline? Transformers cannot be used after the final estimator.


Solution

  • We developed PipeGraph, an extension to Scikit-Learn Pipeline that allows you to get intermediate data, build graph like workflows, and in particular, solve this problem (see the examples in the gallery at http://mcasl.github.io/PipeGraph )