German Credit Classification TaskSource:
A classification task for the German credit data set. The aim is to predict creditworthiness, labeled as "good" and "bad". Positive class is set to label "good".
See example for the creation of a MeasureClassifCosts as described misclassification costs.
R6::R6Class inheriting from TaskClassif.
Data set originally published on UCI. This is the preprocessed version taken from package rchallenge with factors instead of dummy variables, and corrected as proposed by Ulrike Grömping.
Professor Dr. Hans Hofmann
Institut für Statistik und Ökonometrie
2000 Hamburg 13
This Task can be instantiated via the dictionary mlr_tasks or with the associated sugar function
Task type: “classif”
Features: “age”, “amount”, “credit_history”, “duration”, “employment_duration”, “foreign_worker”, “housing”, “installment_rate”, “job”, “number_credits”, “other_debtors”, “other_installment_plans”, “people_liable”, “personal_status_sex”, “present_residence”, “property”, “purpose”, “savings”, “status”, “telephone”
Grömping U (2019). “South German Credit Data: Correcting a Widely Used Data Set.” Reports in Mathematics, Physics and Chemistry 4, Department II, Beuth University of Applied Sciences Berlin. http://www1.beuth-hochschule.de/FB_II/reports/Report-2019-004.pdf.
Chapter in the mlr3book: https://mlr3book.mlr-org.com/basics.html#tasks
Package mlr3data for more toy tasks.
Package mlr3oml for downloading tasks from https://www.openml.org.
Package mlr3viz for some generic visualizations.
Dictionary of Tasks: mlr_tasks
as.data.table(mlr_tasks)for a table of available Tasks in the running session (depending on the loaded packages).
mlr3fselect and mlr3filters for feature selection and feature filtering.
Extension packages for additional task types:
Unsupervised clustering: mlr3cluster
Probabilistic supervised regression and survival analysis: https://mlr3proba.mlr-org.com/.
task = tsk("german_credit") costs = matrix(c(0, 1, 5, 0), nrow = 2) dimnames(costs) = list(predicted = task$class_names, truth = task$class_names) measure = msr("classif.costs", id = "german_credit_costs", costs = costs) print(measure) #> <MeasureClassifCosts:german_credit_costs>: Cost-sensitive Classification #> * Packages: mlr3 #> * Range: [0, Inf] #> * Minimize: TRUE #> * Average: macro #> * Parameters: normalize=TRUE #> * Properties: - #> * Predict type: response