Git Product home page Git Product logo

Comments (5)

a-berg avatar a-berg commented on June 21, 2024

This I'd like to know too. From the README:

A supervised learning estimator, with a 'fit' method that returns the feature_importances_ attribute. Important features must correspond to high absolute values in the feature_importances_.

However, I tried using RReliefF and it gives an error, saying that the method needs a "max_depth" variable (therefore can only work with random forests).

    371     def _get_tree_num(self, n_feat):
--> 372         depth = self.estimator.get_params()['max_depth']
    373         if depth == None:
    374             depth = 10

I'd urge the author to fix the README as to not mislead people into believing this works with any other algorithm that is not tree-based.

from boruta_py.

UTUnex avatar UTUnex commented on June 21, 2024

Hi, I also met the problem that a-berg mentioned. It seems that the model must explicitly have the parameter 'max_depth' to make it usable in BorutaPy. I'm working with the model 'AdaBoostClassifier' and 'RUSBoostClassifier', both of which do not explicitly have the 'max_depth' in their parameter lists and when either of them is put in BorutaPy, there just appears the KeyError: 'max_depth'. I wonder whether this problem can be solved.

from boruta_py.

danielhomola avatar danielhomola commented on June 21, 2024

This is the only place we rely on the max_depth param of the estimator
https://github.com/scikit-learn-contrib/boruta_py/blob/master/boruta/boruta_py.py#L398

It'd be trivial to add a try/except statement here, and make sure to inform the user if the estimator does not have a max_depth property and as a consequence we cannot automatically estimate the number of trees to use.. Any one of you'd like to submit a PR for this?

Thanks

from boruta_py.

UTUnex avatar UTUnex commented on June 21, 2024

@danielhomola ,hi, thank you for your reply. So will you consider making some modification to the code to support those estimators like Adaboost which itself doesn't explicitly have the max_depth parameter but its base_estimator like DecisionTree does have this parameter. So I wonder whether it's possible for you to make the BorutaPy able to extract such implict max_depth in the future.

Besides, I also tried to put the XGBoostClassifier and LightGBMClassifier in BorutaPy and again the error occurred, it's about the RandomState problem : 'TypeError: Unknown type of parameter:random_state, got:RandomState'. I dont know how to solve this, could you please help?
Do you have the plan to improve the compatibility of BorutaPy with other popular tree-based models besides RandomForest?

from boruta_py.

danielhomola avatar danielhomola commented on June 21, 2024

?? no.. that's why I asked you to submit a PR.. if you do so, I'll review it and merge it happily but I don't have time to actively do dev on this repo any more.

from boruta_py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.