sklearn.feature_selection vs xgboost feature_importances

Can somebody explain in-detailed differences between sklearn.feature_selection and xgboost feature_importances? And how the algorithms work under the hood?

Which module gives the best results?


They are very different things. sklearn.feature_selection is a general library to perform feature selection. xgboost feature_importances is simply description of how each feature is important (for details should refer in the xgboost documentations) in regards with model-fitting procedure and it is simply attribute and it is up to you how you can use this importance.

You can however, apply feature selection on top of xgboost model or models that follow some level of sklearn models api structure, for example using sklearn.feature_selection.RFE .


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.