{
  "id": 118669,
  "title": "How to do further feature engineering？",
  "url": "/competitions/ashrae-energy-prediction/discussion/118669",
  "author_name": "",
  "post_date": "2019-11-23T09:57:08.196524500Z",
  "votes": 7,
  "comment_count": 10,
  "views": 0,
  "content": "<p>I just started to try to participate in the kaggle competition. For feature engineering, I have only learned to use some built-in functions such as sklearn and pandas to perform some feature processing, such as: missing value padding, text-type feature processing, what should I do for further feature engineering?</p>",
  "messages": [
    {
      "id": "679735",
      "postDate": "11/23/2019 09:57:08",
      "content": "<p>I just started to try to participate in the kaggle competition. For feature engineering, I have only learned to use some built-in functions such as sklearn and pandas to perform some feature processing, such as: missing value padding, text-type feature processing, what should I do for further feature engineering?</p>",
      "rawMarkdown": "I just started to try to participate in the kaggle competition. For feature engineering, I have only learned to use some built-in functions such as sklearn and pandas to perform some feature processing, such as: missing value padding, text-type feature processing, what should I do for further feature engineering?",
      "votes": null
    },
    {
      "id": "679757",
      "postDate": "11/23/2019 10:30:41",
      "content": "<p><a href=\"/jf0214\">@jf0214</a> Some of the common feature engineering techniques used are</p>\n\n<p>1.Imputation\n2.Handling Outliers\n3.Binning\n4.Log Transform\n5.One-Hot Encoding\n6.Grouping Operations\n7.Feature Split\n8.Scaling\n9.Extracting Date</p>\n\n<p>For the feature engineering for ASHRAE great energy predictor challenge  , the following are the feature engineering starter kernels which you can use to get started</p>\n\n<p><a href=\"https://www.kaggle.com/gouherdanishiitkgp/ashrae-basic-eda-and-feature-engineering\">https://www.kaggle.com/gouherdanishiitkgp/ashrae-basic-eda-and-feature-engineering</a></p>\n\n<p><a href=\"https://www.kaggle.com/drcapa/ashrae-feature-engineering-merge-data\">https://www.kaggle.com/drcapa/ashrae-feature-engineering-merge-data</a></p>\n\n<p><a href=\"https://www.kaggle.com/kaushal2896/ashrae-eda-fe-lightgbm-1-12\">https://www.kaggle.com/kaushal2896/ashrae-eda-fe-lightgbm-1-12</a></p>\n\n<p>You can also learn about Feature engineering from the kaggle course here</p>\n\n<p><a href=\"https://www.kaggle.com/learn/feature-engineering\">https://www.kaggle.com/learn/feature-engineering</a></p>\n\n<p>Other blogs which you might find useful are</p>\n\n<p><a href=\"https://analyticsindiamag.com/introduction-to-feature-engineering-and-its-techniques-for-machine-learning/\">https://analyticsindiamag.com/introduction-to-feature-engineering-and-its-techniques-for-machine-learning/</a></p>\n\n<p><a href=\"https://elitedatascience.com/feature-engineering-best-practices\">https://elitedatascience.com/feature-engineering-best-practices</a></p>\n\n<p><a href=\"https://www.analyticsvidhya.com/blog/2018/08/guide-automated-feature-engineering-featuretools-python/\">https://www.analyticsvidhya.com/blog/2018/08/guide-automated-feature-engineering-featuretools-python/</a></p>\n\n<p>If you find the answer helpful , kindly upvote !!! Good Luck</p>",
      "rawMarkdown": "jf0214 Some of the common feature engineering techniques used are\n\n 1.Imputation\n2.Handling Outliers\n3.Binning\n4.Log Transform\n5.One-Hot Encoding\n6.Grouping Operations\n7.Feature Split\n8.Scaling\n9.Extracting Date\n\nFor the feature engineering for ASHRAE great energy predictor challenge  , the following are the feature engineering starter kernels which you can use to get started\n\nhttps://www.kaggle.com/gouherdanishiitkgp/ashrae-basic-eda-and-feature-engineering\n\nhttps://www.kaggle.com/drcapa/ashrae-feature-engineering-merge-data\n\nhttps://www.kaggle.com/kaushal2896/ashrae-eda-fe-lightgbm-1-12\n\nYou can also learn about Feature engineering from the kaggle course here\n\nhttps://www.kaggle.com/learn/feature-engineering\n\nOther blogs which you might find useful are\n\nhttps://analyticsindiamag.com/introduction-to-feature-engineering-and-its-techniques-for-machine-learning/\n\nhttps://elitedatascience.com/feature-engineering-best-practices\n\nhttps://www.analyticsvidhya.com/blog/2018/08/guide-automated-feature-engineering-featuretools-python/\n\nIf you find the answer helpful , kindly upvote !!! Good Luck",
      "votes": null
    },
    {
      "id": "679762",
      "postDate": "11/23/2019 10:36:01",
      "content": "<p>Filling in missing data is not feature engineering. It is pre-processing. You need to understand the relationship features have with the target variable whether by themselves or in unison (feature-feature interaction). An example of feature-feature interaction is combining <code>air_temperature</code> and <code>dew_temperature</code>. The combination of both features may be better used by a tree based model because it can converge faster if the interaction is beneficial. You can look at tree based model's feature importance to get an idea of which features may benefit from combining. Another form of feature engineering that is very powerful is group statistics. By smartly grouping certain categories, you model will be better able to build it's decision splits. Feature engineering should begin with some intuition about how a feature or group of feature behaves in relation to the target variable. It's also hard to explain in too much detail without giving away too much information. Part of feature engineering is looking for magic features, which are essentially features that bring that extra kick to increasing model performance. </p>",
      "rawMarkdown": "Filling in missing data is not feature engineering. It is pre-processing. You need to understand the relationship features have with the target variable whether by themselves or in unison (feature-feature interaction). An example of feature-feature interaction is combining `air_temperature` and `dew_temperature`. The combination of both features may be better used by a tree based model because it can converge faster if the interaction is beneficial. You can look at tree based model's feature importance to get an idea of which features may benefit from combining. Another form of feature engineering that is very powerful is group statistics. By smartly grouping certain categories, you model will be better able to build it's decision splits. Feature engineering should begin with some intuition about how a feature or group of feature behaves in relation to the target variable. It's also hard to explain in too much detail without giving away too much information. Part of feature engineering is looking for magic features, which are essentially features that bring that extra kick to increasing model performance.",
      "votes": null
    },
    {
      "id": "679773",
      "postDate": "11/23/2019 10:50:51",
      "content": "<p>Thank you for your enthusiasm,  I have learned a lot.</p>",
      "rawMarkdown": "Thank you for your enthusiasm,  I have learned a lot.",
      "votes": null
    },
    {
      "id": "679775",
      "postDate": "11/23/2019 10:51:12",
      "content": "<p>Thank you, your answer is very helpful, I will take a good look at the link you provided.💪 </p>",
      "rawMarkdown": "Thank you, your answer is very helpful, I will take a good look at the link you provided.💪",
      "votes": null
    },
    {
      "id": "679817",
      "postDate": "11/23/2019 12:58:19",
      "content": "<p>特征工程确实挺难的</p>",
      "rawMarkdown": "特征工程确实挺难的",
      "votes": null
    },
    {
      "id": "679878",
      "postDate": "11/23/2019 15:26:16",
      "content": "<p>Hi,\nYou could plot the feature importances of your model, and then combine the top n features using mathematical operations, like addition, subtraction, multiplication or division. If they are two categorical features, you could concatenate them to form a new categorical feature.</p>",
      "rawMarkdown": "Hi,\nYou could plot the feature importances of your model, and then combine the top n features using mathematical operations, like addition, subtraction, multiplication or division. If they are two categorical features, you could concatenate them to form a new categorical feature.",
      "votes": null
    },
    {
      "id": "681654",
      "postDate": "11/26/2019 11:37:39",
      "content": "<p><a href=\"/teeyee314\">@teeyee314</a> I have a question about how to combine two numerical features? consider it as categorical features?</p>",
      "rawMarkdown": "teeyee314 I have a question about how to combine two numerical features? consider it as categorical features?",
      "votes": null
    },
    {
      "id": "681661",
      "postDate": "11/26/2019 11:41:59",
      "content": "<p>convert to str. <code>df[comb_feature] = df[feature1].apply(lambda x: str(x)) + '_' + df[feature2].apply(lambda x: str(x))</code></p>",
      "rawMarkdown": "convert to str. `df[comb_feature] = df[feature1].apply(lambda x: str(x)) + '_' + df[feature2].apply(lambda x: str(x))`",
      "votes": null
    },
    {
      "id": "681810",
      "postDate": "11/26/2019 15:20:04",
      "content": "<p><a href=\"/teeyee314\">@teeyee314</a> \nThanks for your explanation. :)</p>",
      "rawMarkdown": "teeyee314 \nThanks for your explanation. :)",
      "votes": null
    },
    {
      "id": "1261509",
      "postDate": "04/03/2021 06:05:17",
      "content": "<p>Thanks for sharing information on feature engineering.</p>\n<ol>\n<li><p>Imputation comes in feature engineering or preprocessing?</p></li>\n<li><p>Can you share some notebook on which handled outliers?</p></li>\n<li><p>Log transformation is for skewness?</p></li>\n<li><p>Can you elaborate little more on feature split?</p></li>\n</ol>",
      "rawMarkdown": "Thanks for sharing information on feature engineering.\n\n1. Imputation comes in feature engineering or preprocessing?\n\n2. Can you share some notebook on which handled outliers?\n\n3. Log transformation is for skewness?\n\n4. Can you elaborate little more on feature split?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 679757,
      "author_name": "usharengaraju",
      "author_url": "",
      "post_date": "11/23/2019 10:30:41",
      "content": "<p><a href=\"/jf0214\">@jf0214</a> Some of the common feature engineering techniques used are</p>\n\n<p>1.Imputation\n2.Handling Outliers\n3.Binning\n4.Log Transform\n5.One-Hot Encoding\n6.Grouping Operations\n7.Feature Split\n8.Scaling\n9.Extracting Date</p>\n\n<p>For the feature engineering for ASHRAE great energy predictor challenge  , the following are the feature engineering starter kernels which you can use to get started</p>\n\n<p><a href=\"https://www.kaggle.com/gouherdanishiitkgp/ashrae-basic-eda-and-feature-engineering\">https://www.kaggle.com/gouherdanishiitkgp/ashrae-basic-eda-and-feature-engineering</a></p>\n\n<p><a href=\"https://www.kaggle.com/drcapa/ashrae-feature-engineering-merge-data\">https://www.kaggle.com/drcapa/ashrae-feature-engineering-merge-data</a></p>\n\n<p><a href=\"https://www.kaggle.com/kaushal2896/ashrae-eda-fe-lightgbm-1-12\">https://www.kaggle.com/kaushal2896/ashrae-eda-fe-lightgbm-1-12</a></p>\n\n<p>You can also learn about Feature engineering from the kaggle course here</p>\n\n<p><a href=\"https://www.kaggle.com/learn/feature-engineering\">https://www.kaggle.com/learn/feature-engineering</a></p>\n\n<p>Other blogs which you might find useful are</p>\n\n<p><a href=\"https://analyticsindiamag.com/introduction-to-feature-engineering-and-its-techniques-for-machine-learning/\">https://analyticsindiamag.com/introduction-to-feature-engineering-and-its-techniques-for-machine-learning/</a></p>\n\n<p><a href=\"https://elitedatascience.com/feature-engineering-best-practices\">https://elitedatascience.com/feature-engineering-best-practices</a></p>\n\n<p><a href=\"https://www.analyticsvidhya.com/blog/2018/08/guide-automated-feature-engineering-featuretools-python/\">https://www.analyticsvidhya.com/blog/2018/08/guide-automated-feature-engineering-featuretools-python/</a></p>\n\n<p>If you find the answer helpful , kindly upvote !!! Good Luck</p>",
      "votes": null,
      "replies": [
        {
          "id": 679775,
          "author_name": "jf0214",
          "author_url": "",
          "post_date": "11/23/2019 10:51:12",
          "content": "<p>Thank you, your answer is very helpful, I will take a good look at the link you provided.💪 </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1261509,
          "author_name": "sureshmecad",
          "author_url": "",
          "post_date": "04/03/2021 06:05:17",
          "content": "<p>Thanks for sharing information on feature engineering.</p>\n<ol>\n<li><p>Imputation comes in feature engineering or preprocessing?</p></li>\n<li><p>Can you share some notebook on which handled outliers?</p></li>\n<li><p>Log transformation is for skewness?</p></li>\n<li><p>Can you elaborate little more on feature split?</p></li>\n</ol>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 679762,
      "author_name": "teeyee314",
      "author_url": "",
      "post_date": "11/23/2019 10:36:01",
      "content": "<p>Filling in missing data is not feature engineering. It is pre-processing. You need to understand the relationship features have with the target variable whether by themselves or in unison (feature-feature interaction). An example of feature-feature interaction is combining <code>air_temperature</code> and <code>dew_temperature</code>. The combination of both features may be better used by a tree based model because it can converge faster if the interaction is beneficial. You can look at tree based model's feature importance to get an idea of which features may benefit from combining. Another form of feature engineering that is very powerful is group statistics. By smartly grouping certain categories, you model will be better able to build it's decision splits. Feature engineering should begin with some intuition about how a feature or group of feature behaves in relation to the target variable. It's also hard to explain in too much detail without giving away too much information. Part of feature engineering is looking for magic features, which are essentially features that bring that extra kick to increasing model performance. </p>",
      "votes": null,
      "replies": [
        {
          "id": 679773,
          "author_name": "jf0214",
          "author_url": "",
          "post_date": "11/23/2019 10:50:51",
          "content": "<p>Thank you for your enthusiasm,  I have learned a lot.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 681654,
          "author_name": "m10515009",
          "author_url": "",
          "post_date": "11/26/2019 11:37:39",
          "content": "<p><a href=\"/teeyee314\">@teeyee314</a> I have a question about how to combine two numerical features? consider it as categorical features?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 681661,
          "author_name": "teeyee314",
          "author_url": "",
          "post_date": "11/26/2019 11:41:59",
          "content": "<p>convert to str. <code>df[comb_feature] = df[feature1].apply(lambda x: str(x)) + '_' + df[feature2].apply(lambda x: str(x))</code></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 681810,
          "author_name": "m10515009",
          "author_url": "",
          "post_date": "11/26/2019 15:20:04",
          "content": "<p><a href=\"/teeyee314\">@teeyee314</a> \nThanks for your explanation. :)</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 679817,
      "author_name": "lldatamining",
      "author_url": "",
      "post_date": "11/23/2019 12:58:19",
      "content": "<p>特征工程确实挺难的</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 679878,
      "author_name": "yushg123",
      "author_url": "",
      "post_date": "11/23/2019 15:26:16",
      "content": "<p>Hi,\nYou could plot the feature importances of your model, and then combine the top n features using mathematical operations, like addition, subtraction, multiplication or division. If they are two categorical features, you could concatenate them to form a new categorical feature.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "679735": "I just started to try to participate in the kaggle competition. For feature engineering, I have only learned to use some built-in functions such as sklearn and pandas to perform some feature processing, such as: missing value padding, text-type feature processing, what should I do for further feature engineering?",
    "679757": "jf0214 Some of the common feature engineering techniques used are\n\n 1.Imputation\n2.Handling Outliers\n3.Binning\n4.Log Transform\n5.One-Hot Encoding\n6.Grouping Operations\n7.Feature Split\n8.Scaling\n9.Extracting Date\n\nFor the feature engineering for ASHRAE great energy predictor challenge  , the following are the feature engineering starter kernels which you can use to get started\n\nhttps://www.kaggle.com/gouherdanishiitkgp/ashrae-basic-eda-and-feature-engineering\n\nhttps://www.kaggle.com/drcapa/ashrae-feature-engineering-merge-data\n\nhttps://www.kaggle.com/kaushal2896/ashrae-eda-fe-lightgbm-1-12\n\nYou can also learn about Feature engineering from the kaggle course here\n\nhttps://www.kaggle.com/learn/feature-engineering\n\nOther blogs which you might find useful are\n\nhttps://analyticsindiamag.com/introduction-to-feature-engineering-and-its-techniques-for-machine-learning/\n\nhttps://elitedatascience.com/feature-engineering-best-practices\n\nhttps://www.analyticsvidhya.com/blog/2018/08/guide-automated-feature-engineering-featuretools-python/\n\nIf you find the answer helpful , kindly upvote !!! Good Luck",
    "679762": "Filling in missing data is not feature engineering. It is pre-processing. You need to understand the relationship features have with the target variable whether by themselves or in unison (feature-feature interaction). An example of feature-feature interaction is combining `air_temperature` and `dew_temperature`. The combination of both features may be better used by a tree based model because it can converge faster if the interaction is beneficial. You can look at tree based model's feature importance to get an idea of which features may benefit from combining. Another form of feature engineering that is very powerful is group statistics. By smartly grouping certain categories, you model will be better able to build it's decision splits. Feature engineering should begin with some intuition about how a feature or group of feature behaves in relation to the target variable. It's also hard to explain in too much detail without giving away too much information. Part of feature engineering is looking for magic features, which are essentially features that bring that extra kick to increasing model performance.",
    "679773": "Thank you for your enthusiasm,  I have learned a lot.",
    "679775": "Thank you, your answer is very helpful, I will take a good look at the link you provided.💪",
    "679817": "特征工程确实挺难的",
    "679878": "Hi,\nYou could plot the feature importances of your model, and then combine the top n features using mathematical operations, like addition, subtraction, multiplication or division. If they are two categorical features, you could concatenate them to form a new categorical feature.",
    "681654": "teeyee314 I have a question about how to combine two numerical features? consider it as categorical features?",
    "681661": "convert to str. `df[comb_feature] = df[feature1].apply(lambda x: str(x)) + '_' + df[feature2].apply(lambda x: str(x))`",
    "681810": "teeyee314 \nThanks for your explanation. :)",
    "1261509": "Thanks for sharing information on feature engineering.\n\n1. Imputation comes in feature engineering or preprocessing?\n\n2. Can you share some notebook on which handled outliers?\n\n3. Log transformation is for skewness?\n\n4. Can you elaborate little more on feature split?"
  },
  "source": "meta"
}