haneulpark commited on
Commit
7e04e23
·
verified ·
1 Parent(s): 80ad6d2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +25 -26
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%|██████████| 5.23k/5.23k [00:00<00:00, 35.1kkB/s]
80
- Downloading data: 100%|██████████| 34.5k//34.5k/ [00:00<00:00, 155kB/s]
81
- Downloading data: 100%|██████████| 97.1k/97.1k [00:00<00:00, 587kB/s]
82
- Generating test split: 100%|██████████| 594/594 [00:00<00:00, 12705.92 examples/s]
83
- Generating train split: 100%|██████████| 1788/1788 [00:00<00:00, 43895.91 examples/s]
84
 
85
  and inspecting the loaded dataset
86
 
87
  >>> AggregatorAdvisor
88
- HematoxLong2023
89
  DatasetDict({
90
- test: Dataset({
91
- features: ['new SMILES', 'label'],
92
- num_rows: 594
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/HematoxLong2023', name = 'HematoxLong2023')
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
- "name": "cat_boost_classifier",
127
- "config": {
128
- "x_features": ['new SMILES::morgan', 'new SMILES::maccs_rdkit'],
129
- "y_features": ['Label']}})
130
-
131
  model.train(split_featurised_dataset["train"])
132
  preds = model.predict(split_featurised_dataset["test"])
133
-
134
- classification_suite = load_suite("classification")
135
-
136
- scores = classification_suite.compute(
137
- references=split_featurised_dataset["test"]['Label'],
138
- predictions=preds["cat_boost_classifier::Label"])
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