Assume that a sales rep has actions A, B, C, D.... X that he can perform to influence a physician to write his drug

I want to predict what the next best action a sales rep should take to have the highest impact on a physician

For example, if a sales rep has already performed A, D, F then i want to predict the next best action for the sales rep to perform to convert the physician to a writer

What models/algorithms are suitable for this type of a problem?

  • $\begingroup$ assuming actions are non-repeatable independent events couldn't you just compute the conversion rate for each action, reverse sort these resuts by conv rate, and then your if your most recent action was i, the next best is i+1. $\endgroup$ Commented Mar 4, 2016 at 10:42
  • $\begingroup$ Do want to take into consideration physician attributes or do they all look equal to you? $\endgroup$
    – Diego
    Commented Mar 6, 2016 at 14:35

2 Answers 2


Expanding on my comment, the simplest predictive model would be to just compute the conversion rates Pr(conversion | action) for each action {A,B,C,D, ... }.

A solution in R:


set.seed(100) # for reproducibility
action <- sample(letters[1:5], 100, replace = TRUE) # dummy up sales actions (independent variable)
converted <- as.logical(rbinom(100, 1, prob = .5))  # dummy up physician conversion (dependent variable)

(df <- data.frame(action = action, converted = converted))

# Compute conversion rates for each action
conv_df <- df %>% 
  group_by(action, converted) %>% # unique combinations of action by converted
  summarize(freq = n()) %>% # compute freq of unique combinations
  spread(converted, freq) %>% # spread rows to cols
  mutate(rate = `TRUE`/sum(`TRUE`,`FALSE`)) # compute conversion rate

conv_df[order(-conv_df$rate),] #reverse sort

##Source: local data frame [5 x 4]
##Groups: action [5]
##  action FALSE  TRUE      rate
##  (fctr) (int) (int)     (dbl)
##1      d     8    13 0.6190476
##2      e     7    11 0.6111111
##3      a     5     6 0.5454545
##4      c    13    10 0.4347826
##5      b    17    10 0.3703704

The solution above assumes the application is to be some sort of guide for sales reps... if you are wanting to model the distribution of actions in sales contexts, you would need to compute the prevalence of each action as well.


As Brandon suggested I thing the right formalism is to predict the probability increase of the desired target given the prescription was written. I think using causal models is a good go to solution as you can frame the prescriptions as treatments and the models will attempt to reduce the bias within the data. Models such as econML or causalML


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.