utterworks / fast-bert

Super easy library for BERT based NLP models
Apache License 2.0
1.86k stars 341 forks source link

in case of multi-label classfication there is no way to change label column name in val.csv, and label_col parameter will be a list of label columns from labels.csv? #284

Open aleh4d opened 3 years ago

aleh4d commented 3 years ago

Am I right to say that: in case of multi-label classfication there is no way to change label field name in val.csv,
and label_col parameter will be a list of label columns from labels.csv?

lingdoc commented 1 year ago

your val.csv must contain a single one-hot-coded label column for each label you want to classify. with 3 labels the column heads would be (for example): toxic  aggressive  neutral

your labels.csv must contain a row for each label:

toxic
aggressive
neutral

your label_col parameter will then be a list of the labels: ["toxic", "aggressive", "neutral"]