Description Usage Arguments Value Examples
Plots binary outcome, use for binary models outcomes etc.
1 2 |
df |
Data |
pred_name |
Predictions' column name |
actual_name |
Actual values' column name |
x_lab |
X-axis label |
y_lab |
Y-axis label |
theme |
Theme function to use |
type |
Plot type, |
smooth |
Logical, whether plot smoothing line or not |
smoothing_level |
If |
Plot object
1 2 3 4 5 6 7 8 9 10 | df <- data.frame(
actual = c(1,1,1,1,1,0,1,1,1,0,1,1,0,1,1,1,1,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0),
predicted = seq(1, 0, length.out = 40)
)
plot_binary_outcome(df, 'predicted', 'actual')
plot_binary_outcome(df, 'predicted', 'actual', smoothing_level = 0.75)
plot_binary_outcome(df, 'predicted', 'actual', x_lab = 'Predicted', y_lab = 'Actual')
plot_binary_outcome(df, 'predicted', 'actual', theme = theme_bw())
plot_binary_outcome(df, 'predicted', 'actual', type = 'pipes', theme = theme_bw())
plot_binary_outcome(df, 'predicted', 'actual', type = 'jitter', theme = theme_bw())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.