library(irks) knitr::opts_chunk$set( collapse = TRUE, warning = FALSE, message = FALSE, comment = "#>", # fig.path = "man/figures/README-", out.width = "100%" ) library(ggplot2) theme_set(jbkmisc::theme_jbk())
Is a set of tools for credit risk modelling.
You can install the released version of irks from CRAN with:
install.packages("irks")
And the development version from GitHub with:
# install.packages("devtools") devtools::install_github("jbkunst/irks")
library(irks) library(dplyr) data("german_credit") german_credit <- select(german_credit, good_bad, status_of_existing_checking_account, duration_in_month, savings_account_or_bonds, credit_amount, purpose, age_in_years) duni <- describe(german_credit) duni dbiv <- describe_bivariate(german_credit, target = good_bad, verbose = FALSE) arrange(dbiv, desc(iv))
x <- german_credit$duration_in_month y <- german_credit$good_bad bin <- binning(x, y) bin # plot(bin)
var_importance
german_credit <- mutate_if(german_credit, is.character, as.factor) rf <- randomForest::randomForest(factor(good_bad) ~ ., data = german_credit) var_importance(rf) rrf <- RRF::RRF(factor(good_bad) ~ ., data = german_credit) var_importance(rrf) library(partykit) ct <- ctree(Species ~ ., data = iris) ct_rules(ct)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.