# 4th place solution

**URL:** <https://community.drivendata.org/t/4th-place-solution/2851>\
**Category:** Cold Start Energy Forecasting\
**Created:** [November 1, 2018, 8:13am UTC](https://community.drivendata.org/t/4th-place-solution/2851 "2018-11-01T08:13:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DenisVorotyntsev](https://yyz2.discourse-cdn.com/flex028/user_avatar/community.drivendata.org/denisvorotyntsev/32/622_2.png) [@DenisVorotyntsev](https://community.drivendata.org/u/DenisVorotyntsev)\
**Post date:** [November 1, 2018, 8:13am UTC](https://community.drivendata.org/t/4th-place-solution/2851/1 "2018-11-01T08:13:41Z")

</div>

Hello.

This post is a short description of my final approach in this competition. I tried a lot of different ideas, which I’m going to describe in detail in a paper/blog post on medium, but 90% of success is due to:

**Preprocessing**  
Min\_max scaling within ‘series\_id’, del all targets that have more than 4 constant values in sequence (I guess those are missing values that were replaced by median). Fill missing temperatures with hourly mean / month mean using only train data.

**Features**  
Categorical features from timestamp: year, month, day, day of year, hour of year, day of week, hour of day. Those categories transformed with sin/cos transformation and used as numerical features.  
Additional features: is\_day\_off, is\_next\_day\_off, type of building (sum of day\_off columns as string), series\_id as category.

**Validation**  
10 StratifiedKFold on series\_id

**Models**  
FF NN, 5 layers, 512 neurons in each layer, relu activation. Adam optimizer, mae loss (mape, rmse gave worse results).

**Fun stuff**  
Two weeks ago I found a bug in my code: I was predicting the consumption 24-336 hours backward. It ruined days and weeks, but hours were ok (I was in top10 with 3307 score). After fixing this bug, I became top1 with a gap to the 2nd place, but it seems for me that I slightly overfitted the leaderboard and after a shakeup end up on 4th place.

Graz to the winners and thank you all for the competition. Good luck in next events!

---

<div class="post-metadata">

**Author:** ![c3josh](https://avatars.discourse-cdn.com/v4/letter/c/c89c15/32.png) [@c3josh](https://community.drivendata.org/u/c3josh)\
**Post date:** [November 1, 2018, 2:18pm UTC](https://community.drivendata.org/t/4th-place-solution/2851/2 "2018-11-01T14:18:44Z")

</div>

Thanks Denis - I very much look forward to your blog. Please link it back here when you have published it!!

---

<div class="post-metadata">

**Author:** ![gatescao](https://avatars.discourse-cdn.com/v4/letter/g/85e7bf/32.png) [@gatescao](https://community.drivendata.org/u/gatescao)\
**Post date:** [November 1, 2018, 8:53pm UTC](https://community.drivendata.org/t/4th-place-solution/2851/3 "2018-11-01T20:53:17Z")

</div>

Thank you for sharing! Looking forward to the blog post on Medium.

---

<div class="post-metadata">

**Author:** ![snanurag](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@snanurag](https://community.drivendata.org/u/snanurag)\
**Post date:** [November 5, 2018, 6:12am UTC](https://community.drivendata.org/t/4th-place-solution/2851/4 "2018-11-05T06:12:57Z")

</div>

Thanks @DenisVorotyntsev. We are eagerly waiting for your blog.

---

<div class="post-metadata">

**Author:** ![DenisVorotyntsev](https://yyz2.discourse-cdn.com/flex028/user_avatar/community.drivendata.org/denisvorotyntsev/32/622_2.png) [@DenisVorotyntsev](https://community.drivendata.org/u/DenisVorotyntsev)\
**Post date:** [January 10, 2019, 4:36pm UTC](https://community.drivendata.org/t/4th-place-solution/2851/5 "2019-01-10T16:36:07Z")

</div>

Post about my approach: [https://towardsdatascience.com/cold-start-energy-predictions-d3971b1803e](https://towardsdatascience.com/cold-start-energy-predictions-d3971b1803e)
