0
$\begingroup$

I have a dataset of past emails sent, when they were sent and if they were opened. What would be the best model to predict the best time to send email?

I was thinking of modeling it as time series with values 1(email opened), 0(email not sent) and -1(email not opened).

$\endgroup$
1
$\begingroup$

Good question, probably a good handful of ways to look at this as it sounds like a classic classification problem.

Define the label

First step, before you choose a model, would be to define the label. As you suggested, I would go for email opened = 1 and email not opened = 0. I would then think about throwing the email not sent (-1) data away, as I'm not sure you can learn anything about a probability of opening when it wasn't sent.

It would then be important to check the balance of the label: are they mostly opened or mostly ignored? This will influence any decision to add a class weight if it is imbalanced towards one class.

Define features

So time series could work, but I think another good angle might be to bin the send times into half hourly slots (or shorter, depending on your needs) and treat them as a categorical variable. You would then one-hot encode this feature. Anything else you can add to this will probably help, such as the kind of person it was sent to and what country they're in etc.

Choose model

So it's classification, so have a play around with either logistic regression or something tree based (random forests, gradient boosted trees) to get something going quickly. It's usually a case of trial and error to find the best one.

You can then use traditional metrics of precision/recall/accuracy to measure how good it is. Make sure you know which metric is most important to your problem when optimising the model.

| improve this answer | |
$\endgroup$
  • $\begingroup$ I would imaging that the subject line would be very important here. How would you control for that? I'm reminded of partial dependence plots but I'm not sure. $\endgroup$ – Jonathan Porter Feb 21 '18 at 16:18
  • $\begingroup$ Eesh good question. Depends on how many possibilities there are for the subject line contents. If there are a manageable number (and there is enough training data) it could be another categorical variable for one-hotting. It's not a question I could answer without being able to explore the data though I think - things like a barplot of subject line vs. open probability would be a start in seeing how influential it is. $\endgroup$ – jshep Feb 21 '18 at 16:24
1
$\begingroup$

Two things:

  1. Best time in general. I would simply do visualizations. I would look at the conversion rates per time of sending. If am interested in hourly time I would compute conversion rates per hour if sending. If day of week the same thing.

    1. Predicting best time for each and every customer. I would do a classification model to predict. Two approaches:

i. If predicting best day of week My label would be day of week of targeting if only that customer converted otherwise the label would be 'not_convert'.

ii. The same applies for predicting hour of day.

| improve this answer | |
$\endgroup$
0
$\begingroup$

Have you spent any time exploring your data descriptively? Have you look at at simple counts and percentages of emails opened vs not opened by year, month, day, and perhaps time of day? The reason I'm asking is that you may find some answers simply by conducting an exploratory analysis and reviewing descriptives before you jump into modeling.

With regard to modeling, you could start with a logistic regression model where the outcome is email opened (1) vs email not opened (0). I don't think you should include email not sent as you do not need to predict that action; you know if the email was sent or not. For your predictors, you could partition your datetimes into multiple features, such as month, day, time of day, year, etc. You could also consider including additional predictors in your model, such as recipients' age, gender, location, etc., if these data are available to you.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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