--- language: en source_datasets: curated license: mit tags: - chemistry - toxicology pretty_name: Human & Rat Liver Microsomal Stability dataset_summary: >- Curation of databases of compounds for assessing human liver microsomes (HLM) stability and rat liver microsomes (RLM) stability. citation: |- @article{ author = {Longqiang Li, Zhou Lu, Guixia Liu, Yun Tang, and Weihua Li}, doi = {10.1021/acs.chemrestox.2c00207}, journal = {Chemical Research in Toxicology}, number = {9}, title = {In Silico Prediction of Human and Rat Liver Microsomal Stability via Machine Learning Methods}, volume = {35}, year = {2022}, url = {https://pubs.acs.org/doi/10.1021/acs.chemrestox.2c00207}, publisher = {American Chemical Society} } size_categories: - 10K>> import datasets and load one of the `HLM_RLM` datasets, e.g., >>> HLM = datasets.load_dataset("maomlab/HLM_RLM", name = "HLM") Downloading readme: 100%|████████████████████████| 6.93k/6.93k [00:00<00:00, 280kB/s] Downloading data: 100%|██████████████████████████| 680k/680k [00:00<00:00, 946kB/s] Downloading data: 100%|██████████████████████████| 925k/925k [00:01<00:00, 634kB/s] Downloading data: 100%|██████████████████████████| 39.7k/39.7k [00:00<00:00, 90.8kB/s] Generating test split: 100%|█████████████████████| 1131/1131 [00:00<00:00, 20405.98 examples/s] Generating train split: 100%|████████████████████| 4771/4771 [00:00<00:00, 65495.46 examples/s] Generating external split: 100%|████████████████████| 111/111 [00:00<00:00, 3651.94 examples/s] and inspecting the loaded dataset >>> HLM HLM DatasetDict({ test: Dataset({ features: ['ID','SMILES', 'Y'], num_rows: 1131 }) train: Dataset({ features: ['ID','SMILES', 'Y'], num_rows: 4771 }) external: Dataset({ features: ['ID','SMILES', 'Y'], num_rows: 111 }) }) ### 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 a 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_dataset = load_dataset('maomlab/HLM_RLM', name = 'HLM') 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 Chem. Res. Toxicol. 2022, 35, 9, 1614–1624 Publication Date:September 2, 2022 https://doi.org/10.1021/acs.chemrestox.2c00207