Comments (5)
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.
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.
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.
@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.
?? 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)
- Numpy types aliases deprecated (`np.int`, `np.bool` and `np.float`)
- why estimators num is calculated by feature num in this way?
- max_iter values HOT 3
- ImportError: cannot import name 'BorutaPy' from 'boruta' HOT 1
- PKG for the survival analysis HOT 6
- Can I somehow speed the Borutapy process HOT 2
- Version update of Boruta on pypi? HOT 5
- What percentage of shadow features does each real feature outperform?
- AttributeError: module 'numpy' has no attribute 'int'. HOT 9
- Possible problems in installation HOT 1
- TypeError: BorutaPy.__init__() got an unexpected keyword argument 'early_stopping' HOT 1
- Kaggle n_estimators issue with DecisionTreeClassifier HOT 2
- Error when using BorutaPy with LogisticRegression
- AttributeError: module 'numpy' has no attribute 'bool' when using BorutaPy with RandomForestClassifier HOT 3
- BorutaPy selects different features in different iterations HOT 1
- AttributeError: module 'numpy' has no attribute 'int'. `np.int` was a deprecated alias for the builtin `int`. HOT 13
- Does boruta apply to time series data? HOT 1
- New release HOT 1
- Why does the number of total features (Confirmed + Tentative + Rejected) not equal to the input features?
- Does BorutaPy work with cuML RandomForestClassifier? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boruta_py.