Taxi Fare Surge Predictor
Predicting taxi surge prices.
This project was developed as an interview task. Link to Google Colaboratory and Dataset is provided in the description.
Data Cleaning and Encoding
Primary task in this project revolved aorud data cleansing and making normal data function according to the model. This project required Area code, Month, Day and Time code.
Encoding
---
Area: 0,1,2...
Day of the week: 0 -> Monday, 1 -> Tuesday,...
Time: 0 -> 12 am to 1 am, 1 -> 1 am to 2 am,...
Count: Number of taxi requests coded as 1, 2, 3...
---
Using Decision tree Regressors
Decision tree Regressors are best explained by Georgios Drakos at his Medium Blog Decision Tree Regressor explained in depth.
I used Scikit’s Decision Tree Regressor to complete this task. Information about this can be found at their documentation.
from sklearn.tree import DecisionTreeRegressor
Using this Decision tree for my data, I get a score of 1.0. the result is predicted for an input of [0,0,0].
Code and Data available here