plot_cumlift#
- scikitplot.modelplotpy.plot_cumlift(plot_input, *, highlight_ntile=None, highlight_how='plot_text', save_fig=True, save_fig_filename='', **kwargs)[source]#
Plotting cumulative lift curve
- Parameters:
- plot_inputpandas.DataFrame
The result from scope_modevalplot().
- highlight_ntileint or None, optional, default=None
Highlight the value of the response curve at a specified ntile value.
Changed in version 0.3.9: Default changed from False to None.
- highlight_how{‘plot’,’text’,’plot_text’}, optional, default=’plot_text’
Highlight_how specifies where information about the model performance is printed. It can be shown as text, on the plot or both.
- **kwargsdict, optional
Generic keyword arguments.
- Returns:
- matplotlib.axes._subplots.AxesSubplot
It returns a matplotlib.axes._subplots.AxesSubplot object that can be transformed into the same plot with the .figure command. The plot is by default written to disk (save_fig = True). The location and filetype of the file depend on the save_fig_filename parameter. If the save_fig_filename parameter is empty (not specified), the plot will be written to the working directory as png. Otherwise the location and file type is specified by the user.
- Other Parameters:
- show_figbool, default=True
Show the plot.
- save_figbool, default=False
Save the plot.
- save_fig_filenamestr, optional, default=’’
Specify the path and filetype to save the plot. If nothing specified, the plot will be saved as png inside
result_images
under to the current working directory. Defaults to plot image named to usedfunc.__name__
.- verbosebool, optional
If True, prints debugging information.
- Raises:
- TypeError
If
highlight_ntile
is not specified as an int.- ValueError
If the wrong
highlight_how
value is specified.
- Parameters:
plot_input (pandas.DataFrame)