--- version: 1.0.0 license: cc-by-nc-4.0 task_categories: - tabular-regression language: - en tags: - IUPAC - pKa pretty_name: IUPAC_pKa size_categories: - 10K>> import datasets and load the `IUPAC_pKa` datasets, e.g., >>> IUPAC_pKa = datasets.load_dataset('maomlab/IUPAC_pKa') README.md: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5.06k/5.06k [00:00<00:00, 771kB/s] train-00000-of-00001.parquet: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 947k/947k [00:00<00:00, 34.0MB/s] test-00000-of-00001.parquet: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 519k/519k [00:00<00:00, 23.5MB/s] Generating train split: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████| 18168/18168 [00:00<00:00, 260823.23 examples/s] Generating test split: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 6054/6054 [00:00<00:00, 231724.00 examples/s] and inspecting the loaded dataset >>> IUPAC_pKa DatasetDict({ train: Dataset({ features: ['unique_ID', 'SMILES', 'InChI', 'pka_type', 'Y', 'T', 'remarks', 'method', 'assessment', 'ref', 'ref_remarks', 'entry_remarks', 'original_IUPAC_names', 'name_contributors', 'num_name_contributors', 'original_IUPAC_nicknames', 'source', 'pressure', 'acidity_label', 'original_T', 'solvent', 'ClusterNo', 'MolCount', 'group'], num_rows: 18168 }) test: Dataset({ features: ['unique_ID', 'SMILES', 'InChI', 'pka_type', 'Y', 'T', 'remarks', 'method', 'assessment', 'ref', 'ref_remarks', 'entry_remarks', 'original_IUPAC_names', 'name_contributors', 'num_name_contributors', 'original_IUPAC_nicknames', 'source', 'pressure', 'acidity_label', 'original_T', 'solvent', 'ClusterNo', 'MolCount', 'group'], num_rows: 6054 }) }) ### 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_dataset = load_dataset('maomlab/IUPAC_pKa') 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_regressor", "config": { "x_features": ['SMILES::morgan', 'SMILES::maccs_rdkit'], "y_features": ['Y']}}) model.train(split_featurised_dataset["train"]) preds = model.predict(split_featurised_dataset["test"]) regression_suite = load_suite("regression") scores = regression_suite.compute( references=split_featurised_dataset["test"]['Y'], predictions=preds["cat_boost_regressor::Y"]) ### Citation Zheng, Jonathan W. and Lafontant-Joseph, Olivier. (2024) IUPAC Digitized pKa Dataset, v2.2. Copyright © 2024 International Union of Pure and Applied Chemistry (IUPAC), The dataset is reproduced by permission of IUPAC and is licensed under a CC BY-NC 4.0. Access at https://doi.org/10.5281/zenodo.7236453.