Path: blob/master/april_18/lessons/lesson-10/code/solution-code/solution-code-10.ipynb
1905 views
Kernel: Python 2
Cost Benefit Questions
How would you rephrase the business problem if your model was optimizing toward precision? i.e., How might the model behave differently, and what effect would it have?
How would you rephrase the business problem if your model was optimizing toward recall?
What would the most ideal model look like in this case?
Answers:
If this model where optimized toward precision, we'd be minimizing the number of false positives: users who are targeted in the campaign but are not retained.
If this model where optimized toward recall, we'd be minimizing the number of false negatives, or making sure that users who could have retained, did.
The model would be most optimized, at this point, towards recall, as there's the largest business gain.
Visualizing models over variables
In [2]:
In [3]:
In [4]:
Out[4]:
In [5]:
In [6]:
Out[6]:
(458311, 37)
In [10]:
In [11]:
Out[11]:
[<matplotlib.text.Text at 0x108e4ee90>]
Other Answers: visualizing Airline performance over time; visualizing the inverse
In [12]:
Out[12]:
[<matplotlib.text.Text at 0x109f0ca90>]
In [15]:
Out[15]:
[<matplotlib.text.Text at 0x10a68bcd0>]
Visualizing Performance Against Baseline
Visualizing AUC and comparing Models
In [16]:
In [20]:
In [ ]:
In [21]:
Out[21]:
[<matplotlib.text.Text at 0x10b8d5650>,
<matplotlib.text.Text at 0x108ea2250>,
(0, 1),
(0, 1),
<matplotlib.text.Text at 0x109140250>]
Visualizing Precision / Recall (with cleaner code)
In [22]:
In [23]:
Out[23]:
[<matplotlib.text.Text at 0x10a306e90>,
<matplotlib.text.Text at 0x108ef1650>,
(0, 1),
(0, 1),
<matplotlib.text.Text at 0x10b26d690>]
In [ ]: