mlr-org / mlr3

mlr3: Machine Learning in R - next generation
https://mlr3.mlr-org.com
GNU Lesser General Public License v3.0
906 stars 84 forks source link

Task printer should give target class info #1022

Open mb706 opened 2 months ago

mb706 commented 2 months ago
<TaskClassif:german_credit> (1000 x 21): German Credit
* Target: credit_risk
* Properties: twoclass
* Features (20):
  - fct (14): credit_history, employment_duration, foreign_worker, housing, job, other_debtors, other_installment_plans, people_liable, personal_status_sex, property, purpose,
    savings, status, telephone
  - int (3): age, amount, duration
  - ord (3): installment_rate, number_credits, present_residence

extend the Target with another line. In the 2-class case,

  "good" (positive class; 70%), "bad" (30%)

In the multiclass-case,

  "setosa" (33%), "versicolor" (33%), "virginica" (33%)

In the 2-class-case, the positive class should be printed first. In the multiclass-case, print in order of class frequency descending (tie break alphabetically?) and limit the length of the output based on options(width)