Description Usage Arguments Value See Also Examples
Returns a plot showing the gini of one or more models compared to the perfect model and the Null model
Note: Predictions should be annualised (independent of exposure)
1 |
actual |
Array[Numeric] - Values we are aiming to predict. |
predicted |
Array[Numeric] / DataFrame[Numeric] - Values that we have predicted. |
weight |
Optional: Array[Numeric] - Weighting of predictions. If NULL even weighting is used |
na.rm |
logical. Should missing values be removed? |
use_plotly |
Optional: boolean - If TRUE plotly object is returned else ggplot2 object |
plotly/ggplot object of showing gini curve for all predictions given
1 2 3 4 5 6 7 8 9 10 11 | # Input as vector
actual <- rnorm(100, mean=100, sd=10)
weight <- rep(1,100)
predicted <- actual + rnorm(100, mean=0, sd=1)
plot_gini(actual, predicted, weight)
# Input as dataframe
predicted <- data.frame(pred1 = actual + rnorm(100, mean=0, sd=1), pred2 = rnorm(100, mean=0, sd=1))
plot_gini(actual, predicted, weight)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.