mlr-org / mlr3

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

How to use classweights for a multiclass outcome? #949

Open skanskan opened 12 months ago

skanskan commented 12 months ago

The documentation says

classweights adds a class weight column. 
Sample weights are added to each sample according to the target class. 
Only binary classification tasks are supported.

Then, how can we generate a classweights column with mlr3 if we have a multiclass outcome?