Instructions to use STRIDE-lab/clinicalbert-data-collection-20261106 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use STRIDE-lab/clinicalbert-data-collection-20261106 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="STRIDE-lab/clinicalbert-data-collection-20261106")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("STRIDE-lab/clinicalbert-data-collection-20261106") model = AutoModelForSequenceClassification.from_pretrained("STRIDE-lab/clinicalbert-data-collection-20261106", device_map="auto") - Notebooks
- Google Colab
- Kaggle
clinicalbert-data-collection-20261106
Fine-tuned model from the PsyNamic project (code, webapp): Data Collection.
This is the model deployed in the PsyNamic webapp after the revision (Nov 2026). It supersedes STRIDE-lab/biobert-data-collection-20250221 (tag submission-v1, initial submission). All current models: PsyNamic collection.
Base Model
emilyalsentzer/Bio_ClinicalBERT
Task
Data Collection
Indicates whether data were collected prospectively or retrospectively.
Labels (id2label)
| ID | Label | Definition |
|---|---|---|
| 0 | Not applicable | E.g., for systematic reviews. |
| 1 | Prospective | Data has been gathered prospectively (always select prospective for study protocols). |
| 2 | Retrospective | Data has been collected retrospectively (case series and reports are always retrospective). |
| 3 | Unknown | Data collection unknown. |
Prediction rule
Single-label: softmax over the labels, the label with the highest probability (argmax) is predicted.
Model selection
Five base models (BiomedBERT-abstract, BioBERT, BioLinkBERT, ClinicalBERT, SciBERT) were fine-tuned with identical hyperparameters. The checkpoint is the one with the lowest validation loss (early stopping), and the base model was selected on the validation set (weighted F1). The test set was used once, after selection.
Test Performance
Held-out test set (96 abstracts), argmax as in the webapp, 95% bootstrap CIs (1,000 BCa resamples).
| Metric (test) | Value [95% CI] |
|---|---|
| Weighted F1 | 0.901 [0.834β0.952] |
| Weighted precision | 0.923 [0.869β0.978] |
| Weighted recall | 0.906 [0.833β0.948] |
Usage
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
repo = "STRIDE-lab/clinicalbert-data-collection-20261106"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForSequenceClassification.from_pretrained(repo)
inputs = tokenizer("<title>. <abstract>", truncation=True, max_length=512, return_tensors="pt")
logits = model(**inputs).logits
pred = model.config.id2label[int(logits.argmax(-1))]
Training Parameters
{
"data": "<private_dataset>",
"task": "Data Collection",
"model": "clinicalbert",
"cross_val": false,
"batch_size": 8,
"learning_rate": 5e-05,
"weight_decay": 0.01,
"lr_scheduler": "linear",
"warmup_ratio": 0.1,
"epochs": 30,
"dropout": 0.1,
"early_stopping_patience": 5,
"gradient_clipping": 1.0,
"max_length": 512,
"threshold": 0.5,
"is_multilabel": false
}
threshold (0.5) is only used to compute the validation metrics of multi-label tasks during training. It has no effect for this single-label model, which predicts by argmax.
- Downloads last month
- 69
Model tree for STRIDE-lab/clinicalbert-data-collection-20261106
Base model
emilyalsentzer/Bio_ClinicalBERT