Constructing the lift curve
The lift curve is an evaluation curve that assesses the performance of your model. It shows how many times more than average the model reaches targets.
To construct this curve, you can use the plot_lift_curve method in the scikitplot module and the matplotlib.pyplot module. As for each model evaluation metric or curve, you need the true target values on the one hand and the predictions on the other hand to construct the cumulative gains curve.
Este exercício faz parte do curso
Introduction to Predictive Analytics in Python
Instruções do exercício
- Import the
matplotlib.pyplotmodule. - Import the
scikitplotmodule. - Construct the cumulative gains curve, given that the model outputs the values in
predictions_testand the true target values are intargets_test.
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# Import the matplotlib.pyplot module
____ as plt
# Import the scikitplot module
____ as skplt
# Plot the lift curve
skplt.metrics.____(____, ____)
plt.show()