--- license: mit language: en tags: - chemistry - chemical information task_categories: - tabular-classification pretty_name: Hematotoxicity Dataset dataset_summary: >- The hematotoxicity dataset consists of a training set with 1788 molecules and a test set with 594 molecules. The train and test datasets were created after sanitizing and splitting the original dataset in the paper below. citation: |- @article{, author = {Teng-Zhi Long, Shao-Hua Shi, Shao Liu, Ai-Ping Lu, Zhao-Qian Liu, Min Li, Ting-Jun Hou*, and Dong-Sheng Cao}, doi = {10.1021/acs.jcim.2c01088}, journal = {Journal of Chemical Information and Modeling}, number = {1}, title = {Structural Analysis and Prediction of Hematotoxicity Using Deep Learning Approaches}, volume = {63}, year = {2023}, url = {https://pubs.acs.org/doi/10.1021/acs.jcim.2c01088}, publisher = {ACS publications} } size_categories: - 1K>> import datasets and load one of the `HematoxLong2023` datasets, e.g., >>> HematoxLong2023 = datasets.load_dataset("maomlab/HematoxLong2023", name = "HematoxLong2023") Downloading readme: 100%|██████████| 5.23k/5.23k [00:00<00:00, 35.1kkB/s] Downloading data: 100%|██████████| 34.5k//34.5k/ [00:00<00:00, 155kB/s] Downloading data: 100%|██████████| 97.1k/97.1k [00:00<00:00, 587kB/s] Generating test split: 100%|██████████| 594/594 [00:00<00:00, 12705.92 examples/s] Generating train split: 100%|██████████| 1788/1788 [00:00<00:00, 43895.91 examples/s] and inspecting the loaded dataset >>> HematoxLong2023 HematoxLong2023 DatasetDict({ test: Dataset({ features: ['SMILES', 'Y'], num_rows: 594 }) train: Dataset({ features: ['SMILES', 'Y'], num_rows: 1788 }) }) ### Use a dataset to train a model One way to use the dataset is through the [MolFlux](https://exscientia.github.io/molflux/) package developed by Exscientia. First, from the command line, install `MolFlux` library with `catboost` and `rdkit` support pip install 'molflux[catboost,rdkit]' then load, featurize, split, fit, and evaluate the catboost model import json from datasets import load_dataset from molflux.datasets import featurise_dataset from molflux.features import load_from_dicts as load_representations_from_dicts from molflux.splits import load_from_dict as load_split_from_dict from molflux.modelzoo import load_from_dict as load_model_from_dict from molflux.metrics import load_suite Split and evaluate the catboost model split_dataset = load_dataset('maomlab/HematoxLong2023', name = 'HematoxLong2023') split_featurised_dataset = featurise_dataset( split_dataset, column = "SMILES", representations = load_representations_from_dicts([{"name": "morgan"}, {"name": "maccs_rdkit"}])) model = load_model_from_dict({ "name": "cat_boost_classifier", "config": { "x_features": ['SMILES::morgan', 'SMILES::maccs_rdkit'], "y_features": ['Y']}}) model.train(split_featurised_dataset["train"]) preds = model.predict(split_featurised_dataset["test"]) classification_suite = load_suite("classification") scores = classification_suite.compute( references=split_featurised_dataset["test"]['Y'], predictions=preds["cat_boost_classifier::Y"]) ## Citation Cite this: J. Chem. Inf. Model. 2023, 63, 1, 111–125 Publication Date:December 6, 2022 https://doi.org/10.1021/acs.jcim.2c01088 Copyright © 2024 American Chemical Society