Skip to content

Commit

Permalink
f5
Browse files Browse the repository at this point in the history
  • Loading branch information
jbkunst committed Mar 18, 2024
1 parent 0d936af commit 16e2923
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ Suggests:
Depends:
R (>= 2.10)
VignetteBuilder: knitr
RoxygenNote: 7.2.1
RoxygenNote: 7.2.3
22 changes: 20 additions & 2 deletions R/ggplots.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,10 @@ ecdf_data <- function(actual, predicted){
#'
#' gg_model_partials(m)
#'
#' gg_model_coef(m) + ggplot2::coord_flip() + ggplot2::scale_y_discrete(limits = rev)
#' gg_model_vif(m) + ggplot2::coord_flip() + ggplot2::scale_x_discrete(limits = rev)
#'
#' gg_model_corr(m, upper = TRUE)
#'
#' gg_model_corr(m, upper = TRUE) +
#' ggplot2::coord_flip() +
#' ggplot2::scale_y_discrete(limits = rev) +
Expand Down Expand Up @@ -550,6 +551,8 @@ gg_model_calibration <- function(model, newdata = NULL,
#'
#' data("woes")
#'
#' woes <- head(woes)
#'
#' pps <- gg_woes(woes)
#'
#' if(require(patchwork)){
Expand All @@ -563,8 +566,8 @@ gg_model_calibration <- function(model, newdata = NULL,
#' }
#'
#' gg_woes(woes, variable = "woe")
#' gg_woes(woes, variable = "bin_iv")
#'
#' gg_woes(woes, variable = "bin_iv")
#'
#' @export
#' @importFrom patchwork get_dim
Expand Down Expand Up @@ -633,6 +636,21 @@ gg_woes <- function(woes,
}



#' data("woes")
#'
# s <- scorecard::scorecard2(
# bins = woes,
# dt = credit,
# "bad",
# points0 = 500,
# odds0 = 1/20,
# pdo = 20
# )
#
# s


# p1 <- gg_model_ks(m) +
# ggplot2::labs(subtitle = "No facet")
# p1
Expand Down
2 changes: 1 addition & 1 deletion R/model-feature-selection.R
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ featsel_brute_force <- function(model, level = 0.95, verbose = TRUE) {
vars_conf_problems <- dplyr::filter(dconf, .data$lower < 0 & .data$upper > 0)
vars_conf_problems <- dplyr::pull(vars_conf_problems, .data$term)

vars_with_problems <- unique(c(vars_sign_problems, vars_conf_problems))
vars_with_problems <- unique(c(vars_conf_problems, vars_sign_problems))

if(length(vars_with_problems) == 0){

Expand Down
3 changes: 3 additions & 0 deletions dev/risk3r.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ library(randomForest)
library(performance)
library(parameters)
library(broom)
data("credit")
#
if(require(kunstomverse)){
library(extrafont)
Expand Down

0 comments on commit 16e2923

Please sign in to comment.