used existing split rather than MolFlux splitting
Browse files
README.md
CHANGED
@@ -143,27 +143,20 @@ First, from the command line, install `MolFlux` library with `catboost` and `rdk
|
|
143 |
then load, featurize, split, fit, and evaluate the a catboost model
|
144 |
|
145 |
import json
|
146 |
-
from
|
|
|
147 |
from molflux.features import load_from_dicts as load_representations_from_dicts
|
148 |
from molflux.splits import load_from_dict as load_split_from_dict
|
149 |
from molflux.modelzoo import load_from_dict as load_model_from_dict
|
150 |
from molflux.metrics import load_suite
|
151 |
|
152 |
-
|
153 |
|
154 |
-
|
155 |
-
|
156 |
column = "SMILES",
|
157 |
representations = load_representations_from_dicts([{"name": "morgan"}, {"name": "maccs_rdkit"}]))
|
158 |
-
|
159 |
-
shuffle_strategy = load_split_from_dict({
|
160 |
-
"name": "shuffle_split",
|
161 |
-
"presets": {
|
162 |
-
"train_fraction": 0.8,
|
163 |
-
"validation_fraction": 0.0,
|
164 |
-
"test_fraction": 0.2}})
|
165 |
-
split_featurised_dataset = next(split_dataset(featurised_dataset, shuffle_strategy))
|
166 |
-
|
167 |
model = load_model_from_dict({
|
168 |
"name": "cat_boost_classifier",
|
169 |
"config": {
|
|
|
143 |
then load, featurize, split, fit, and evaluate the a catboost model
|
144 |
|
145 |
import json
|
146 |
+
from datasets import load_set
|
147 |
+
from molflux.datasets import featurise_dataset
|
148 |
from molflux.features import load_from_dicts as load_representations_from_dicts
|
149 |
from molflux.splits import load_from_dict as load_split_from_dict
|
150 |
from molflux.modelzoo import load_from_dict as load_model_from_dict
|
151 |
from molflux.metrics import load_suite
|
152 |
|
153 |
+
split_dataset = load_dataset('maomlab/B3DB', name = 'B3DB_classification')
|
154 |
|
155 |
+
split_featurised_dataset = featurise_dataset(
|
156 |
+
split_dataset,
|
157 |
column = "SMILES",
|
158 |
representations = load_representations_from_dicts([{"name": "morgan"}, {"name": "maccs_rdkit"}]))
|
159 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
160 |
model = load_model_from_dict({
|
161 |
"name": "cat_boost_classifier",
|
162 |
"config": {
|