File size: 1,220 Bytes
8203dda e72743c 8203dda 772f64f 8203dda e72743c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# Clinical Trial Dataset
This dataset contains data for multiple clinical trial prediction tasks. Each task includes multiple phases, with training and testing data provided in CSV format.
## Dataset Structure
The dataset is structured as follows:
- **Tasks**: Different clinical trial prediction tasks.
- **Phases**: Different phases for each task (e.g., Phase1, Phase2).
- **Types**: Training and testing data (e.g., train_x, train_y, test_x, test_y, train, test).
Each row in the dataset represents a file, with features or labels provided for prediction tasks.
## Usage
To use this dataset, you can load it using the `datasets` library from Hugging Face.
### Loading the Dataset
You can load the dataset as follows:
```python
from datasets import load_dataset
import pandas as pd
import numpy as np
if __name__ == '__main__':
data = {}
dataset = load_dataset('ML2Healthcare/ClinicalTrialDataset')
dataset = dataset['train'].to_dict()
for task, phase, type_, table in zip(dataset['task'], dataset['phase'], dataset['type'], dataset['data']):
table = pd.DataFrame.from_dict(eval(table, {'nan': np.nan}))
table_name = f"{task}_{phase}_{type_}"
data[table_name] = table |