mlr-org / mlr3pipelines

Dataflow Programming for Machine Learning in R
https://mlr3pipelines.mlr-org.com/
GNU Lesser General Public License v3.0
137 stars 25 forks source link

How to use classweights for a multiclass outcome? #798

Open skanskan opened 1 year ago

skanskan commented 1 year 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?