CoolFace
Modelpublic

UMCU/cardioner_medroberta.nl_multilabel

sourceHugging Facegpl-3.0updated 2y agoView on Hugging Face
0likes8.2kdownloads
Model Card

Model Card for Cardioner Medroberta.Nl Multilabel

This a medroberta.nl base model finetuned for span classification. This specific model is the average of the best checkpoints per fold over a ten-fold cross-validation. For this model we used the IOB-tagged. Using the IOB-tagging schema facilitates the aggregation of predictions over sequences.

For the chunking we used paragraph based chunking, and we assumed the maximum context length of the base model, i.e. 512 tokens.

Expected input and output

The input should be a string with Dutch cardio clinical text.

CardioNERMedRoBERTa.nlmultilabel is a muticlass span classification model. The classes that can be predicted are disease, medication, procedure and symptom.

Extracting span classification from CardioNERMedRoBERTa.nlmultilabel

The following script converts a string of <512 tokens to a list of span predictions.

python
from transformers import pipeline

le_pipe = pipeline('ner', 
                    model=model, 
                    tokenizer=model, aggregation_strategy="simple", 
                    device=-1)

named_ents = le_pipe(SOME_TEXT)

To process a string of arbitrary length you can split the string into sentences or paragraphs using e.g. pysbd or spacy(sentencizer) and iteratively parse the list of with the span-classification pipe.

Data description

CardioCCC; Manually annotated parallel-language corpus for the clinical cardiology domain

On a 10-fold cross-validations the multilabel metrics are:

MetricMeanMedianStdev
------------
evalf1B-DISEASE0.7820.7770.024
evalf1B-MEDICATION0.8980.9050.036
evalf1B-PROCEDURE0.7880.790.027
evalf1B-SYMPTOM0.730.730.018
evalf1I-DISEASE0.7760.7810.022
evalf1I-MEDICATION0.80.8030.086
evalf1I-PROCEDURE0.7590.7570.018
evalf1I-SYMPTOM0.7250.7230.017
evalf1O0.9350.9360.005
evalf1macro0.7990.7990.018
evalf1micro0.8840.8860.008
eval_loss0.0950.0920.01
evalprecisionB-DISEASE0.7840.7740.029
evalprecisionB-MEDICATION0.9070.9170.035
evalprecisionB-PROCEDURE0.7910.7950.031
evalprecisionB-SYMPTOM0.7210.720.017
evalprecisionI-DISEASE0.790.790.025
evalprecisionI-MEDICATION0.8350.8630.075
evalprecisionI-PROCEDURE0.7840.7790.023
evalprecisionI-SYMPTOM0.7270.720.021
evalprecisionO0.9350.9380.009
evalprecisionmacro0.8080.810.015
evalprecisionmicro0.8880.8890.008
evalraucmacro0.8830.8850.012
evalraucmicro0.9330.9340.005
evalrecallB-DISEASE0.7810.7850.025
evalrecallB-MEDICATION0.8890.8930.039
evalrecallB-PROCEDURE0.7850.7830.025
evalrecallB-SYMPTOM0.7390.740.023
evalrecallI-DISEASE0.7630.7740.028
evalrecallI-MEDICATION0.770.7670.103
evalrecallI-PROCEDURE0.7350.7440.025
evalrecallI-SYMPTOM0.7240.7240.032
evalrecallO0.9340.9340.004
evalrecallmacro0.7910.7950.022
evalrecallmicro0.880.8830.009
evalrocauc_B-DISEASE0.8880.8890.013
evalrocauc_B-MEDICATION0.9440.9460.019
evalrocauc_B-PROCEDURE0.890.8890.013
evalrocauc_B-SYMPTOM0.8660.8670.011
evalrocauc_I-DISEASE0.8730.8790.014
evalrocauc_I-MEDICATION0.8840.8830.052
evalrocauc_I-PROCEDURE0.8620.8660.013
evalrocauc_I-SYMPTOM0.850.8510.016
evalrocauc_O0.8870.8890.008

Acknowledgement

This is part of the DT4H project.

Doi and reference

For more details about training/eval and other scripts, see CardioNER github repo. and for more information on the background, see Datatools4Heart Huggingface/Website