What is a good approach for a lifespan? Let's say I wan't to predict the lifespan of an ad in a listing.

I know a bunch of thing from the ad like:


the title
the price
the location
etc


The target value is the duration of the ad in the listing before it's being removed (item has been sold).

What would be the best approach for engineering the target?

I've tried categorizing the log of the duration, but it's not leveraging the cyclic pattern you can see in the histogram of the lifespan (in hours):



x-axis : lifespan in hours
I think you need to come up with a way to treat the data such that you're thinking in days, not hours, right? The peaks look they're just at 24, 48, 72, 96, (1 day, 2 days, 3 days, 4 days) etc, and are pretty much normally distributed around those peaks.

I think a good test might be to try a categorical approach to start, to see how well you can predict which 'peak' the ad belongs to (is this an ad in the 24-hour normal distribution? the 48-hour?). If you can figure out which peak that ad belongs to then you might be able to identify features that indicate whether it's more likely to be on the short- or long-side of the hump. If you have bad results putting the ads into categories that might tell you something too.

If you do try this, be careful of how you measure performance as your dataset will be unbalanced by the higher occurrence rate of quickly-pulled ads.