1
$\begingroup$

I'm working on a dataset of Uber Rides from Kaggle. Of the important variables there are pickup and drop-off coordinates, passenger count, datetime of pickup, distance and the final price. I'm currently in the exploration phase and just about to begin feature engineering. When I'm plotting the different potential correlations, some of them just feel odd to plot fare against something. For example, fare vs passenger count or fare vs hour doesn't make much sense to me, as the average fare also depends on how far people usually go. Price/km on the other hand seems to have more sense when plotting. Price/km vs year can show yearly price increase, price/km vs hour shows how the hour affects the pricing of the trip and so on.

Example: price/km vs hour, makes sense

price/km vs hour

My question is, would it make sense to change the predicted variable from fare to price/km and then multiply by the trip distance? Obviously if I predict one I have to remove the other from the dataset, but does it matter which one I predict?

$\endgroup$

1 Answer 1

0
$\begingroup$

The target you will want to use will depend entirely on your goal with this analysis. In your case you are asking whether you should set your target to either fare or fare/km.

As you stated, fare/km does make more sense if you want to predict the price per kilometer of your ride (i.e. was there surge pricing? how does price change by time?).

However, consider the question "How much do I expect to earn from a customer X?". Then price on Uber does not depend only on the distance. It also depends on the current supply and demand, the pick-up location (region), etc and predicting a fare/km might obfuscate the total cost of the ride.

For example, we want to predict ride cost. Our features are

  • pick-up location
  • day of week
  • time of day

We can expect that the average ride cost at 3am from a clubbing district will be higher (people heading home from drinking, more kilometers) let's say 100\$ rides, 25km. In comparison at 8pm (when people might be going from restaurants to night clubs, less kilometers) 20\$ rides, 5km. However, if you used the fare/km, then the two would have the same target.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.