Then I use np.meshgrid to get the data in the right shape for the contour plot. First, I generate data over a regular grid to illustrate different claim amounts and then probabilities. The code snippet is small enough to just copy-paste entirely. So I have been making the subsequent filled contour plot I am going to show in the next section to illustrate this. In this framework, it is more important to audit a high dollar claim than a lower dollar claim, even if the higher dollar value claim has a lower probability. I am working with medical insurance claims data at HMS, and often determining models to audit those claims in some way. (If you have a vector of varying probabilities, in R code the estimated revenue will then look like prob 0.02 sum( (50*prob - 1)*pover ).)īut many of the decisions I work with are not a single number in the benefits column. Any single advert may be a bust, but if your model is right and you send out a bunch, you should make this much money in the end. The probabilities you get from your predictive model can be thought of as in the long run averages. So if you have a probability of 10% for 2000 customers, you would expect to make 2000 * (50*0.1 - 1) = 8000. So in this case you need the predicted probability to be above 2% to have an expected positive return on the investment of sending the advert. In this framework, if you have a predictive model for the probability the advert will be successful, then your decision threshold will look like this: $50*probability - $1 If the person buys the product, your company makes $50, and the advert only costs $1 to send. For example, say you are sending adverts in the mail for a product. If you can identify the costs and benefits of making particular decisions, you can set a simple threshold to make that decision. do I do some process to this observation if the probability is 20%, 30%, 60%, etc. So people often talk about setting a decision threshold to turn a predicted probability into a binary yes/no decision. I’ve been making a chart that looks similar to this for a few different projects at work, so figured a quick blog post to show the notes of it would be useful.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |