title: Click revenue prediction model
body: <p>I'm trying to build a model for eCommerce that would predict revenue for single click that comes via online-marketing channels (e.g. google shopping). Clicks are aimed for product detail pages so my training data consists of product details like: price, delivery time, category, manufacturer. Every historical click also has attached revenue to it. The problem is that revenue equals zero for more that 95% of clicks. </p>
  
  <p>Historical data would look like this:</p>
  
  <p><strong><code>click_id | manufacturer | category    | delivery_time | price | revenue</code></strong> <br/>
  <code>1        |man1          | cat1        | 24            | 100   | 0</code><br/>
  <code>2        |man1          | cat1        | 24            | 100   | 0</code><br/>
  <code>3        |man1          | cat1        | 24            | 100   | 0</code><br/>
  <code>4        |man1          | cat1        | 24            | 100   | 120</code><br/>
  <code>5        |man2          | cat2        | 48            | 200   | 0</code><br/></p>
  
  <p>As you can see, it's possible (and common) that two data points have exactly same features and very different value of target variable (revenue). e.g first 4 data points have the same features and and only 4th has revenue. Ideally, my model would on test example with same features predict average revenue for those 4 clicks (which is 30).</p>
  
  <p>My question is about data representation before I try to apply model. I believe I have two choices: </p>
  
  <ul>
  <li>Apply regression directly to click data (like in case above) and hope that regression would do the right thing. In this case regression error would be pretty big on the end so it would be hard to tell how good the model actually is. </li>
  <li>Try to group multiple data points (clicks) to one single point to avoid some zeros - group all data points that have the same features and calculate target (revenue) variable as SUM(revenue)/COUNT(clicks). With this approach I still have a lot of zeroes in revenue (products that got only few clicks) and sometimes there will be thousands of clicks that give you only one data point - which doesn't seem right.</li>
  </ul>
  
  <p>Any advice how to proceed with this problem is very welcomed. </p>