# Way to make custom transformer with ScikitLearn.jl

**URL:** <https://discourse.julialang.org/t/way-to-make-custom-transformer-with-scikitlearn-jl/35860>\
**Category:** General Usage\
**Created:** [March 12, 2020, 12:45am UTC](https://discourse.julialang.org/t/way-to-make-custom-transformer-with-scikitlearn-jl/35860 "2020-03-12T00:45:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![djsegal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/djsegal/32/13752_2.png) [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Post date:** [March 12, 2020, 12:45am UTC](https://discourse.julialang.org/t/way-to-make-custom-transformer-with-scikitlearn-jl/35860/1 "2020-03-12T00:45:58Z")

</div>

Was trying to make an [oversampler](https://mldatapatternjl.readthedocs.io/en/latest/documentation/targets.html#oversample) that fits in with the ScikitLearn.jl package, but it seems like only `BaseRegressor` is supported.

Has anyone figured out a way to make custom transformers for ScikitLearn in Julia?

---

<div class="post-metadata">

**Author:** ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Post date:** [March 12, 2020, 1:07am UTC](https://discourse.julialang.org/t/way-to-make-custom-transformer-with-scikitlearn-jl/35860/2 "2020-03-12T01:07:23Z")

</div>

@cstjean ^

---

<div class="post-metadata">

**Author:** ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Post date:** [March 13, 2020, 4:49am UTC](https://discourse.julialang.org/t/way-to-make-custom-transformer-with-scikitlearn-jl/35860/3 "2020-03-13T04:49:20Z")

</div>

Could you post some more of your code? If by `transformer` you mean "an object that in python supports `.transform(X)`, then you’ll want to implement `ScikitLearnBase.transform(model, X)`. See [GitHub - cstjean/ScikitLearnBase.jl: Abstract interface of ScikitLearn.jl](https://github.com/cstjean/ScikitLearnBase.jl)

@dilumaluthge Thank you for the ping!
