{
  "id": 114161,
  "title": "[New feature ] Relative humidity from dew point and temperature",
  "url": "/competitions/ashrae-energy-prediction/discussion/114161",
  "author_name": "",
  "post_date": "2019-10-24T16:22:48.036676200Z",
  "votes": 10,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Basically what the tittle says, I will give it a try in my new model:</p>\n\n<p><a href=\"https://en.wikipedia.org/wiki/Dew_point#Simple_approximation\">relative humidity from temp and dew temp</a></p>",
  "messages": [
    {
      "id": "656805",
      "postDate": "10/24/2019 16:22:48",
      "content": "<p>Basically what the tittle says, I will give it a try in my new model:</p>\n\n<p><a href=\"https://en.wikipedia.org/wiki/Dew_point#Simple_approximation\">relative humidity from temp and dew temp</a></p>",
      "rawMarkdown": "Basically what the tittle says, I will give it a try in my new model:\n\n[relative humidity from temp and dew temp](https://en.wikipedia.org/wiki/Dew_point#Simple_approximation)",
      "votes": null
    },
    {
      "id": "656908",
      "postDate": "10/24/2019 18:37:18",
      "content": "<p>Yes, I tried that a while ago. Here is my code (no laughing).</p>\n\n<p>```\ndef relative_humidity(Tc,Tdc):\n    E = 6.11*10.0**(7.5*Tdc/(237.7+Tdc))\n    Es = 6.11*10.0**(7.5*Tc/(237.7+Tc)) <br>\n    RH = (E/Es)*100\n    return RH</p>\n\n<p>train['humidity'] = relative_humidity(train.air_temperature, train.dew_temperature).astype(np.float16)</p>\n\n<p>```</p>\n\n<p><a href=\"https://www.weather.gov/media/epz/wxcalc/vaporPressure.pdf\">https://www.weather.gov/media/epz/wxcalc/vaporPressure.pdf</a></p>",
      "rawMarkdown": "Yes, I tried that a while ago. Here is my code (no laughing).\n\n```\ndef relative_humidity(Tc,Tdc):\n    E = 6.11*10.0**(7.5*Tdc/(237.7+Tdc))\n    Es = 6.11*10.0**(7.5*Tc/(237.7+Tc))    \n    RH = (E/Es)*100\n    return RH\n\ntrain['humidity'] = relative_humidity(train.air_temperature, train.dew_temperature).astype(np.float16)\n\n```\n\n[https://www.weather.gov/media/epz/wxcalc/vaporPressure.pdf](https://www.weather.gov/media/epz/wxcalc/vaporPressure.pdf)",
      "votes": null
    },
    {
      "id": "658454",
      "postDate": "10/26/2019 03:01:35",
      "content": "<p>Thank you for sharing 👍</p>",
      "rawMarkdown": "Thank you for sharing 👍",
      "votes": null
    },
    {
      "id": "658457",
      "postDate": "10/26/2019 03:09:19",
      "content": "<p><a href=\"/mutantspore\">@mutantspore</a> did you find it helpful (and if so you are using a tree based model)?</p>",
      "rawMarkdown": "mutantspore did you find it helpful (and if so you are using a tree based model)?",
      "votes": null
    },
    {
      "id": "658510",
      "postDate": "10/26/2019 04:52:13",
      "content": "<p>Well, physics says it should be important and building heating and cooling articles says it's very important, as even just adding or removing the water vapor from the air entering the building takes energy. </p>\n\n<p>As for the effect on my model... not as much as I'd expected, but I think I did get a 0.02 score improvement. I'll be keeping it. I am currently using LightGBM but I really need to rethink how I'm doing this as I've \"hit the wall\" and not really improving.</p>\n\n<p>Unfortunately, Kaggle keeps releasing new competitions and I can't resist at least having a look and a bit of a go at them. Easily distracted  :) </p>",
      "rawMarkdown": "Well, physics says it should be important and building heating and cooling articles says it's very important, as even just adding or removing the water vapor from the air entering the building takes energy. \n\nAs for the effect on my model... not as much as I'd expected, but I think I did get a 0.02 score improvement. I'll be keeping it. I am currently using LightGBM but I really need to rethink how I'm doing this as I've \"hit the wall\" and not really improving.\n\nUnfortunately, Kaggle keeps releasing new competitions and I can't resist at least having a look and a bit of a go at them. Easily distracted  :)",
      "votes": null
    },
    {
      "id": "658796",
      "postDate": "10/26/2019 14:53:01",
      "content": "<p>in R one can use \nlibrary(humidity)</p>\n\n<p>wtrain$rel_humidity  &lt;- RH(wtrain$air_temperature, wtrain$dew_temperature, isK = F)\nUsage\nRH(t, Td, isK = TRUE)\nArguments\nt temperature in Kelvin (K) or in degree Celsius (°C)\nTd dew point in Kelvin (K) or in degree Celsius (°C)\nisK logical indicator whether temperature is in Kelvin (K). The default value is TRUE</p>",
      "rawMarkdown": "in R one can use \nlibrary(humidity)\n\nwtrain$rel_humidity  &lt;- RH(wtrain$air_temperature, wtrain$dew_temperature, isK = F)\nUsage\nRH(t, Td, isK = TRUE)\nArguments\nt temperature in Kelvin (K) or in degree Celsius (°C)\nTd dew point in Kelvin (K) or in degree Celsius (°C)\nisK logical indicator whether temperature is in Kelvin (K). The default value is TRUE",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 656908,
      "author_name": "mutantspore",
      "author_url": "",
      "post_date": "10/24/2019 18:37:18",
      "content": "<p>Yes, I tried that a while ago. Here is my code (no laughing).</p>\n\n<p>```\ndef relative_humidity(Tc,Tdc):\n    E = 6.11*10.0**(7.5*Tdc/(237.7+Tdc))\n    Es = 6.11*10.0**(7.5*Tc/(237.7+Tc)) <br>\n    RH = (E/Es)*100\n    return RH</p>\n\n<p>train['humidity'] = relative_humidity(train.air_temperature, train.dew_temperature).astype(np.float16)</p>\n\n<p>```</p>\n\n<p><a href=\"https://www.weather.gov/media/epz/wxcalc/vaporPressure.pdf\">https://www.weather.gov/media/epz/wxcalc/vaporPressure.pdf</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 658454,
          "author_name": "marquis08",
          "author_url": "",
          "post_date": "10/26/2019 03:01:35",
          "content": "<p>Thank you for sharing 👍</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 658457,
      "author_name": "rcpeters",
      "author_url": "",
      "post_date": "10/26/2019 03:09:19",
      "content": "<p><a href=\"/mutantspore\">@mutantspore</a> did you find it helpful (and if so you are using a tree based model)?</p>",
      "votes": null,
      "replies": [
        {
          "id": 658510,
          "author_name": "mutantspore",
          "author_url": "",
          "post_date": "10/26/2019 04:52:13",
          "content": "<p>Well, physics says it should be important and building heating and cooling articles says it's very important, as even just adding or removing the water vapor from the air entering the building takes energy. </p>\n\n<p>As for the effect on my model... not as much as I'd expected, but I think I did get a 0.02 score improvement. I'll be keeping it. I am currently using LightGBM but I really need to rethink how I'm doing this as I've \"hit the wall\" and not really improving.</p>\n\n<p>Unfortunately, Kaggle keeps releasing new competitions and I can't resist at least having a look and a bit of a go at them. Easily distracted  :) </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 658796,
      "author_name": "michalpilch",
      "author_url": "",
      "post_date": "10/26/2019 14:53:01",
      "content": "<p>in R one can use \nlibrary(humidity)</p>\n\n<p>wtrain$rel_humidity  &lt;- RH(wtrain$air_temperature, wtrain$dew_temperature, isK = F)\nUsage\nRH(t, Td, isK = TRUE)\nArguments\nt temperature in Kelvin (K) or in degree Celsius (°C)\nTd dew point in Kelvin (K) or in degree Celsius (°C)\nisK logical indicator whether temperature is in Kelvin (K). The default value is TRUE</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "656805": "Basically what the tittle says, I will give it a try in my new model:\n\n[relative humidity from temp and dew temp](https://en.wikipedia.org/wiki/Dew_point#Simple_approximation)",
    "656908": "Yes, I tried that a while ago. Here is my code (no laughing).\n\n```\ndef relative_humidity(Tc,Tdc):\n    E = 6.11*10.0**(7.5*Tdc/(237.7+Tdc))\n    Es = 6.11*10.0**(7.5*Tc/(237.7+Tc))    \n    RH = (E/Es)*100\n    return RH\n\ntrain['humidity'] = relative_humidity(train.air_temperature, train.dew_temperature).astype(np.float16)\n\n```\n\n[https://www.weather.gov/media/epz/wxcalc/vaporPressure.pdf](https://www.weather.gov/media/epz/wxcalc/vaporPressure.pdf)",
    "658454": "Thank you for sharing 👍",
    "658457": "mutantspore did you find it helpful (and if so you are using a tree based model)?",
    "658510": "Well, physics says it should be important and building heating and cooling articles says it's very important, as even just adding or removing the water vapor from the air entering the building takes energy. \n\nAs for the effect on my model... not as much as I'd expected, but I think I did get a 0.02 score improvement. I'll be keeping it. I am currently using LightGBM but I really need to rethink how I'm doing this as I've \"hit the wall\" and not really improving.\n\nUnfortunately, Kaggle keeps releasing new competitions and I can't resist at least having a look and a bit of a go at them. Easily distracted  :)",
    "658796": "in R one can use \nlibrary(humidity)\n\nwtrain$rel_humidity  &lt;- RH(wtrain$air_temperature, wtrain$dew_temperature, isK = F)\nUsage\nRH(t, Td, isK = TRUE)\nArguments\nt temperature in Kelvin (K) or in degree Celsius (°C)\nTd dew point in Kelvin (K) or in degree Celsius (°C)\nisK logical indicator whether temperature is in Kelvin (K). The default value is TRUE"
  },
  "source": "meta"
}