Learn R Programming

mlr3 (version 0.12.0)

mlr_tasks_german_credit: German Credit Classification Task

Description

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.

Arguments

Format

R6::R6Class inheriting from TaskClassif.

Construction

mlr_tasks$get("german_credit")
tsk("german_credit")

Meta Information

  • Task type: “classif”

  • Dimensions: 1000x21

  • Properties: “twoclass”

  • Has Missings: FALSE

  • Target: “credit_risk”

  • 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”

References

Gr<U+00F6>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.

See Also

  • Chapter in the mlr3book: https://mlr3book.mlr-org.com/tasks.html

  • Package mlr3data for more toy tasks.

  • Package mlr3oml for downloading tasks from https://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).

  • Extension packages for additional task types:

    • mlr3proba for probabilistic supervised regression and survival analysis.

    • mlr3cluster for unsupervised clustering.

Other Task: TaskClassif, TaskRegr, TaskSupervised, TaskUnsupervised, Task, mlr_tasks_boston_housing, mlr_tasks_breast_cancer, mlr_tasks_iris, mlr_tasks_mtcars, mlr_tasks_penguins, mlr_tasks_pima, mlr_tasks_sonar, mlr_tasks_spam, mlr_tasks_wine, mlr_tasks_zoo, mlr_tasks

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab