Ever since the launch of the app – Unfare, I have been asked this question; how does it work? So to answer that, I decided to write a post about it.
Everyday morning, Unfare gets a price feed for all the routes and dates that is in scope and stores it into a database. It then automatically runs a few processes on this data which updates information like the “fair price”, price list of last 7 days, etc. It also updates the “training data” with the necessary predictor variables for the algorithm. Once all these processes are complete, it will then hand it over to the algorithm.
After completing a few sanity checks, the algorithm updates itself with the data from the flights that had taken off the previous day. This ensures that any mistake in its previous prediction is taken into account. Once updated, the algorithm runs in stages. Each stage taking in new training data compared to the previous set. This ensures that the algorithm improves its accuracy and at the same time is generic to predict on new data.
Once the algorithm is ready to predict, it is fed with that day’s flight and price information. The prediction along with the confidence levels are stored in the database which are then made available to anyone who uses the Unfare app.
The beauty of this workflow is that it is 100% automated and requires no manual intervention from my side. Even if the workflow is disrupted at any point, it will auto-restart from the same point of disruption.
A few technical details:
- Cloud computing service: Amazon EC2
- OS: Linux
- Server: Apache
- Database: MySQL
- Statistical tool: R project
I will do another post on the logic or the hack that Unfare exploits in the coming days. Stay tuned!