{
  "id": 46291,
  "title": "feature selection from ensemble tree model",
  "url": "/competitions/favorita-grocery-sales-forecasting/discussion/46291",
  "author_name": "",
  "post_date": "2017-12-24T02:28:34.624078500Z",
  "votes": 4,
  "comment_count": 10,
  "views": 0,
  "content": "<p>I have some questions about feature selection. </p>\n\n<p>There are lots of ways to select features, like SelectKBest &amp; SelectPercentile &amp; SelectFromModel from sklearn.feature_selection library. </p>\n\n<p>I want to know are these feature importance that ensemble trees model output reliable. </p>\n\n<p>And what's the difference between features select from sklearn library and ensemble trees.</p>",
  "messages": [
    {
      "id": "261803",
      "postDate": "12/24/2017 02:28:34",
      "content": "<p>I have some questions about feature selection. </p>\n\n<p>There are lots of ways to select features, like SelectKBest &amp; SelectPercentile &amp; SelectFromModel from sklearn.feature_selection library. </p>\n\n<p>I want to know are these feature importance that ensemble trees model output reliable. </p>\n\n<p>And what's the difference between features select from sklearn library and ensemble trees.</p>",
      "rawMarkdown": "I have some questions about feature selection. \n\nThere are lots of ways to select features, like SelectKBest &amp; SelectPercentile &amp; SelectFromModel from sklearn.feature_selection library. \n\nI want to know are these feature importance that ensemble trees model output reliable. \n\nAnd what's the difference between features select from sklearn library and ensemble trees.",
      "votes": null
    },
    {
      "id": "262024",
      "postDate": "12/25/2017 00:30:36",
      "content": "<p>One of the best ways to perform feature selection (IMO) is to test how your algorithm performs with and without a feature. Is it better if you include the feature? By how much? Make sure when you are doing that kind of analysis that you aren't doing other things that might change the output (eg. hyperparameter tuning). Having more features is also often just better, so feature selection takes a backseat to feature engineering. </p>\n\n<p>You can also use a model architecture that is good at discovering features on its own ( eg. RNN) so that you don't have to do a lot of feature engineering/selection.</p>",
      "rawMarkdown": "One of the best ways to perform feature selection (IMO) is to test how your algorithm performs with and without a feature. Is it better if you include the feature? By how much? Make sure when you are doing that kind of analysis that you aren't doing other things that might change the output (eg. hyperparameter tuning). Having more features is also often just better, so feature selection takes a backseat to feature engineering. \n\nYou can also use a model architecture that is good at discovering features on its own ( eg. RNN) so that you don't have to do a lot of feature engineering/selection.",
      "votes": null
    },
    {
      "id": "262044",
      "postDate": "12/25/2017 04:01:56",
      "content": "<p>That was a good opinion...Thanks..</p>",
      "rawMarkdown": "That was a good opinion...Thanks..",
      "votes": null
    },
    {
      "id": "263685",
      "postDate": "12/31/2017 11:26:43",
      "content": "<p>Very interesting question. Add and delete features one-by-one may have neglible effect (less that random changes), so it's may be better to add entire group of features at one moment.</p>",
      "rawMarkdown": "Very interesting question. Add and delete features one-by-one may have neglible effect (less that random changes), so it's may be better to add entire group of features at one moment.",
      "votes": null
    },
    {
      "id": "264060",
      "postDate": "01/02/2018 05:55:26",
      "content": "<p>I use   lightgbm.feature_importance('gain')</p>",
      "rawMarkdown": "I use   lightgbm.feature_importance('gain')",
      "votes": null
    },
    {
      "id": "264082",
      "postDate": "01/02/2018 07:32:18",
      "content": "<p>Adding to the answer, ensemble trees feature selectors are only as good for feature selection as their performance allows - that is, a model with 60% accuracy might not be ideal for selecting features based on their importance, since it's lack of accuracy could be done because of incorrect feature importance.</p>\n\n<p>While a single model feature importance could be used, it's ideal to have more rounds of adding and eliminating the feature to have a clearer decision of wether to keep it or not, you can do it using Boruta or RFE for example, but you pay the price by having to compute way more.</p>\n\n<p>For Boruta, you can find more details in Tili's kernel:\n<a href=\"https://www.kaggle.com/tilii7/boruta-feature-elimination\">https://www.kaggle.com/tilii7/boruta-feature-elimination</a></p>",
      "rawMarkdown": "Adding to the answer, ensemble trees feature selectors are only as good for feature selection as their performance allows - that is, a model with 60% accuracy might not be ideal for selecting features based on their importance, since it's lack of accuracy could be done because of incorrect feature importance.\n\nWhile a single model feature importance could be used, it's ideal to have more rounds of adding and eliminating the feature to have a clearer decision of wether to keep it or not, you can do it using Boruta or RFE for example, but you pay the price by having to compute way more.\n\nFor Boruta, you can find more details in Tili's kernel:\nhttps://www.kaggle.com/tilii7/boruta-feature-elimination",
      "votes": null
    },
    {
      "id": "264134",
      "postDate": "01/02/2018 11:05:53",
      "content": "<p>thank you for your reply!</p>",
      "rawMarkdown": "thank you for your reply!",
      "votes": null
    },
    {
      "id": "264135",
      "postDate": "01/02/2018 11:07:32",
      "content": "<p>@To Train Them Is My Cause , What is IMO? </p>",
      "rawMarkdown": "To Train Them Is My Cause , What is IMO?",
      "votes": null
    },
    {
      "id": "264931",
      "postDate": "01/04/2018 06:47:27",
      "content": "<p>it's just the short version of \"In my opinion\" :)</p>",
      "rawMarkdown": "it's just the short version of \"In my opinion\" :)",
      "votes": null
    },
    {
      "id": "265040",
      "postDate": "01/04/2018 12:51:01",
      "content": "<p>thank you for your explanation！</p>",
      "rawMarkdown": "thank you for your explanation！",
      "votes": null
    },
    {
      "id": "265329",
      "postDate": "01/05/2018 07:56:29",
      "content": "<p>you are welcome buddy\nHappy learning!</p>",
      "rawMarkdown": "you are welcome buddy\nHappy learning!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 262024,
      "author_name": "rhgrossm",
      "author_url": "",
      "post_date": "12/25/2017 00:30:36",
      "content": "<p>One of the best ways to perform feature selection (IMO) is to test how your algorithm performs with and without a feature. Is it better if you include the feature? By how much? Make sure when you are doing that kind of analysis that you aren't doing other things that might change the output (eg. hyperparameter tuning). Having more features is also often just better, so feature selection takes a backseat to feature engineering. </p>\n\n<p>You can also use a model architecture that is good at discovering features on its own ( eg. RNN) so that you don't have to do a lot of feature engineering/selection.</p>",
      "votes": null,
      "replies": [
        {
          "id": 262044,
          "author_name": "gsdeepakkumar",
          "author_url": "",
          "post_date": "12/25/2017 04:01:56",
          "content": "<p>That was a good opinion...Thanks..</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 263685,
          "author_name": "zavodrobotov",
          "author_url": "",
          "post_date": "12/31/2017 11:26:43",
          "content": "<p>Very interesting question. Add and delete features one-by-one may have neglible effect (less that random changes), so it's may be better to add entire group of features at one moment.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 264082,
          "author_name": "andrewmvd",
          "author_url": "",
          "post_date": "01/02/2018 07:32:18",
          "content": "<p>Adding to the answer, ensemble trees feature selectors are only as good for feature selection as their performance allows - that is, a model with 60% accuracy might not be ideal for selecting features based on their importance, since it's lack of accuracy could be done because of incorrect feature importance.</p>\n\n<p>While a single model feature importance could be used, it's ideal to have more rounds of adding and eliminating the feature to have a clearer decision of wether to keep it or not, you can do it using Boruta or RFE for example, but you pay the price by having to compute way more.</p>\n\n<p>For Boruta, you can find more details in Tili's kernel:\n<a href=\"https://www.kaggle.com/tilii7/boruta-feature-elimination\">https://www.kaggle.com/tilii7/boruta-feature-elimination</a></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 264134,
          "author_name": "shangweichen",
          "author_url": "",
          "post_date": "01/02/2018 11:05:53",
          "content": "<p>thank you for your reply!</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 264135,
          "author_name": "shangweichen",
          "author_url": "",
          "post_date": "01/02/2018 11:07:32",
          "content": "<p>@To Train Them Is My Cause , What is IMO? </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 264931,
          "author_name": "andrewmvd",
          "author_url": "",
          "post_date": "01/04/2018 06:47:27",
          "content": "<p>it's just the short version of \"In my opinion\" :)</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 265040,
          "author_name": "shangweichen",
          "author_url": "",
          "post_date": "01/04/2018 12:51:01",
          "content": "<p>thank you for your explanation！</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 265329,
          "author_name": "andrewmvd",
          "author_url": "",
          "post_date": "01/05/2018 07:56:29",
          "content": "<p>you are welcome buddy\nHappy learning!</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 264060,
      "author_name": "xuanhahaha",
      "author_url": "",
      "post_date": "01/02/2018 05:55:26",
      "content": "<p>I use   lightgbm.feature_importance('gain')</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "261803": "I have some questions about feature selection. \n\nThere are lots of ways to select features, like SelectKBest &amp; SelectPercentile &amp; SelectFromModel from sklearn.feature_selection library. \n\nI want to know are these feature importance that ensemble trees model output reliable. \n\nAnd what's the difference between features select from sklearn library and ensemble trees.",
    "262024": "One of the best ways to perform feature selection (IMO) is to test how your algorithm performs with and without a feature. Is it better if you include the feature? By how much? Make sure when you are doing that kind of analysis that you aren't doing other things that might change the output (eg. hyperparameter tuning). Having more features is also often just better, so feature selection takes a backseat to feature engineering. \n\nYou can also use a model architecture that is good at discovering features on its own ( eg. RNN) so that you don't have to do a lot of feature engineering/selection.",
    "262044": "That was a good opinion...Thanks..",
    "263685": "Very interesting question. Add and delete features one-by-one may have neglible effect (less that random changes), so it's may be better to add entire group of features at one moment.",
    "264060": "I use   lightgbm.feature_importance('gain')",
    "264082": "Adding to the answer, ensemble trees feature selectors are only as good for feature selection as their performance allows - that is, a model with 60% accuracy might not be ideal for selecting features based on their importance, since it's lack of accuracy could be done because of incorrect feature importance.\n\nWhile a single model feature importance could be used, it's ideal to have more rounds of adding and eliminating the feature to have a clearer decision of wether to keep it or not, you can do it using Boruta or RFE for example, but you pay the price by having to compute way more.\n\nFor Boruta, you can find more details in Tili's kernel:\nhttps://www.kaggle.com/tilii7/boruta-feature-elimination",
    "264134": "thank you for your reply!",
    "264135": "To Train Them Is My Cause , What is IMO?",
    "264931": "it's just the short version of \"In my opinion\" :)",
    "265040": "thank you for your explanation！",
    "265329": "you are welcome buddy\nHappy learning!"
  },
  "source": "meta"
}