-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathplot_logodds.Rd
31 lines (28 loc) · 1.12 KB
/
plot_logodds.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/visualize.R
\name{plot_logodds}
\alias{plot_logodds}
\title{Plot a log-odds table}
\usage{
plot_logodds(df, title = "Evaluation of log-odds linearity",
lab_x = "Mean of variable deciles", lab_y = "Log-odds")
}
\arguments{
\item{df}{A data frame}
\item{title}{Text that is displayed on as the plot title. Defaults to "Lift chart: evaluation of model predicted probabilities vs. actual defaul rates across deciles"}
\item{lab_x}{Text that is displayed on the x axis. Defaults to "Mean of variable deciles"}
\item{lab_y}{Text that is displayed on the y axis. Defaults to "Log-odds"}
}
\description{
This function creates a nicely formatted, standardised log-odds plot. Prior to calling the function
the data should only be in a form of a log-odds table (calculate_logodds_table() function will
do that for you), unless it's already provided.
}
\examples{
recipes::credit_data \%>\%
first_to_lower() \%>\%
calculate_logodds_table(binning = time,
grouping = status,
top_level = "bad") \%>\%
plot_logodds()
}