Datasets:
Update README.md
Browse files
README.md
CHANGED
@@ -76,26 +76,25 @@ then, from within python load the datasets library
|
|
76 |
and load one of the `HematoxLong2023` datasets, e.g.,
|
77 |
|
78 |
>>> AggregatorAdvisor = datasets.load_dataset("maomlab/AggregatorAdvisor", name = "AggregatorAdvisor")
|
79 |
-
Downloading readme: 100%|██████████|
|
80 |
-
Downloading data: 100%|██████████|
|
81 |
-
Downloading data: 100%|██████████|
|
82 |
-
Generating test split: 100%|██████████|
|
83 |
-
Generating train split: 100%|██████████|
|
84 |
|
85 |
and inspecting the loaded dataset
|
86 |
|
87 |
>>> AggregatorAdvisor
|
88 |
-
HematoxLong2023
|
89 |
DatasetDict({
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
})
|
94 |
-
train: Dataset({
|
95 |
-
features: ['new SMILES', 'label'],
|
96 |
-
num_rows: 1788
|
97 |
-
})
|
98 |
})
|
|
|
|
|
|
|
|
|
|
|
99 |
|
100 |
### Use a dataset to train a model
|
101 |
One way to use the dataset is through the [MolFlux](https://exscientia.github.io/molflux/) package developed by Exscientia.
|
@@ -115,7 +114,7 @@ then load, featurize, split, fit, and evaluate the catboost model
|
|
115 |
|
116 |
Split and evaluate the catboost model
|
117 |
|
118 |
-
split_dataset = load_dataset('maomlab/
|
119 |
|
120 |
split_featurised_dataset = featurise_dataset(
|
121 |
split_dataset,
|
@@ -123,18 +122,18 @@ Split and evaluate the catboost model
|
|
123 |
representations = load_representations_from_dicts([{"name": "morgan"}, {"name": "maccs_rdkit"}]))
|
124 |
|
125 |
model = load_model_from_dict({
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
model.train(split_featurised_dataset["train"])
|
132 |
preds = model.predict(split_featurised_dataset["test"])
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
scores =
|
137 |
-
references=split_featurised_dataset["test"]['
|
138 |
-
predictions=preds["
|
139 |
|
140 |
## Citation
|
|
|
76 |
and load one of the `HematoxLong2023` datasets, e.g.,
|
77 |
|
78 |
>>> AggregatorAdvisor = datasets.load_dataset("maomlab/AggregatorAdvisor", name = "AggregatorAdvisor")
|
79 |
+
Downloading readme: 100%|██████████| 4.70k/4.70k [00:00<00:00, 277kB/s]
|
80 |
+
Downloading data: 100%|██████████| 530k/530k [00:00<00:00, 303kB/s]
|
81 |
+
Downloading data: 100%|██████████| 2.16M/2.16M [00:00<00:00, 12.1MB/s]
|
82 |
+
Generating test split: 100%|██████████| 2529/2529 [00:00<00:00, 29924.07 examples/s]
|
83 |
+
Generating train split: 100%|██████████| 10116/10116 [00:00<00:00, 95081.99 examples/s]
|
84 |
|
85 |
and inspecting the loaded dataset
|
86 |
|
87 |
>>> AggregatorAdvisor
|
|
|
88 |
DatasetDict({
|
89 |
+
test: Dataset({
|
90 |
+
features: ['new SMILES', 'substance_id', 'aggref_index', 'logP', 'reference'],
|
91 |
+
num_rows: 2529
|
|
|
|
|
|
|
|
|
|
|
92 |
})
|
93 |
+
train: Dataset({
|
94 |
+
features: ['new SMILES', 'substance_id', 'aggref_index', 'logP', 'reference'],
|
95 |
+
num_rows: 10116
|
96 |
+
})
|
97 |
+
})
|
98 |
|
99 |
### Use a dataset to train a model
|
100 |
One way to use the dataset is through the [MolFlux](https://exscientia.github.io/molflux/) package developed by Exscientia.
|
|
|
114 |
|
115 |
Split and evaluate the catboost model
|
116 |
|
117 |
+
split_dataset = load_dataset('maomlab/AggregatorAdvisor', name = 'AggregatorAdvisor')
|
118 |
|
119 |
split_featurised_dataset = featurise_dataset(
|
120 |
split_dataset,
|
|
|
122 |
representations = load_representations_from_dicts([{"name": "morgan"}, {"name": "maccs_rdkit"}]))
|
123 |
|
124 |
model = load_model_from_dict({
|
125 |
+
"name": "cat_boost_regressor",
|
126 |
+
"config": {
|
127 |
+
"x_features": ['new SMILES::morgan', 'SMILES::maccs_rdkit'],
|
128 |
+
"y_features": ['logP']}})
|
129 |
+
|
130 |
model.train(split_featurised_dataset["train"])
|
131 |
preds = model.predict(split_featurised_dataset["test"])
|
132 |
+
|
133 |
+
regression_suite = load_suite("regression")
|
134 |
+
|
135 |
+
scores = regression_suite.compute(
|
136 |
+
references=split_featurised_dataset["test"]['logP'],
|
137 |
+
predictions=preds["cat_boost_regressor::logP"])
|
138 |
|
139 |
## Citation
|