The Virtuous Cycle of Analytics

How we built a prediction engine using Bayesian Inference to determine with far greater accuracy the likelihood of a hotel room getting booked, thereby delivering revenue to the hotels

Ashok Pandey
New Update

Yogendra Vasupal, CEO & Founder

Advertisment started in 2004 as an idea among 3 friends to find and bring online the ‘value and budget’ rooms in properties across the expanse region of India. In the initial days when we went to meet hotels in Tier 2 and Tier 3 towns, we found that many proprietors were unaware of computers, let alone Internet. After much convincing we managed to persuade them individually, that we would be able to take their rooms ‘online’ and sell it for them. All we required was a signed Contract of Commission and Contract of Allocation. A Contract of Commission is the source of our revenue and the Contract of Allocation the source of our inventory.

We went alpha with 250 hotels in 2006 end. We went beta with 400 hotels in 2007 beginning and finally live by mid 2007 when we noticed that, increasingly, hotels were dishonoring the Contract of Allocation while continuing to honor the Contract of Commission. It really confused us. Are these the bad guys who are going back on their word on room allocation or are they the good guys who are still willing to pay us our commission for a downgraded or upgraded room while treating us as equal partners.

The Problem

When we got down to the drawing board we realized that at a fundamental level we are selling rooms and not hotels. At a fundamental level we realized, we sell rooms and not hotels, and that meant when we ask and receive an allocation of 1 room for 6 months, we are effectively blocking 180 rooms (one room per night for 180 nights) from being sold by the Hotel owner. Of that allocation we were able to consume only 1-2%, with the rest going to waste as these were perishing commodities (the hotel can’t sell yesterday’s rooms today).


Our solution

We set about building a prediction engine which data mined users activity on the front end. Every interaction of the user was parameterized and weighed and then utilized as an input, right down to a user viewing only 3 out of 10 photos for a hotel (which has a good correlation to the future bookability of that hotel, but which way it tilts we will keep it as a suspense). The engine used Bayesian Inference and thus got better over time. We did many parallel, iterative runs initially over the minimal dataset of first year of alpha and beta trials that we had collected and tracked. The engine predicted which hotel rooms and for which days (within a weekly range) were likely to get booked. Initially it was 60% accurate, better than a coin toss but nothing to write home about.

Over the course of a year, as we started getting more visits and more data, the accuracy increased to 75% which gave us a further confidence that with more data the engine will get more accurate.

Just in time allocation was a concept pioneered by us for the online hotel industry which meant that instead of getting 180 room nights allocation for 6 month period we could now pinpoint days when the rooms were likely to get booked and ask hotels to allocate rooms to us for those day. And our utilization of the allocation was dependent upon the accuracy of the prediction enabling us to provide real time booking experience to customers who book through Stayzilla regardless of our servers not being connected to even a basic PC at the hotel.



This virtuous cycle has lead us from 250 properties to 7000 properties on the supply side till December 2013. On the demand side it took us from 4 room nights a day to 750 room nights a day in the same time period. And we had only raised an angel round 9 months earlier to get that far!

From January 2014 onwards this cycle has already taken us to 12000 properties on our network and 1250 room nights per day on the demand side.

The Future

Problems are ephemeral however, sources of problems are eternal. You scale from one source to the other. At our current scale we are looking at the difficulty facing the buyers and working out how effectively we can solve the matching problem for them. Building a system that understands that and delivers the right rooms to the user is where we are headed.

I have started to believe that we are in the match making business now. It’s not about matching brides to grooms, it’s about matching buyers to rooms. We are well placed to handle this challenge as we now have a huge data on the supply side and more importantly data on the buyers preferences that has been collected through our chats and concierge service.

virtuous-cycle-of-analytics prediction-engine bayesian-inference yogendra-vasupal ceo-founder-stayzilla-com