automate detection of classifier and regressor for tree based transformers
At the moment, in the categorical tree encoder and the tree discretiser, we have an argument is_regression that the user needs to fill in in order to detect if the user is aiming to perform classification or regression.
Sklearn has an automated process with the is_classification (see Decision tree source code).
Can we bring this functionality to feature-engine?
I think we can :p
Hi @solegalli
This problem looks interesting, is still available? I would like to get more details about it. :)
kind regards.
Hi @indymnv
At the moment, the classes in feature-engine take a parameter where the user indicates if if the algorithm they want to use is a regression or classification algorithm. But sklearn has functionality to detect this automatically.
Thus, my idea is to remove this parameter from the classes in Feature-engine and instead use sklearn functions is_classifier and is_regressor, to detect this automatically. The functions can be found here:
https://github.com/scikit-learn/scikit-learn/blob/95119c13af77c76e150b753485c662b7c52a41a2/sklearn/base.py#L771
Should be fairly easy (she said :p)
I would be very happy for you to give this one a go :)
@solegalli Looking to contribute. Can I take this if available?
Hey @dataML007 yes, this one is still for the taking. It would be great to have your contribution :) thank you!
Hey @dataML007 , @indymnv and @NicoGalli
Would any of you be able to pick up this issue?
It should be fairly straightforward :)
@solegalli please assign it to me.
assigned :p
If no one is tackling this issue, I'll take it on.
Btw, be careful tossing around the term "straightforward"! Very few things are as straightforward as they seem ;p
It would be great if you can pick this one up @Morgan-Sell :)