Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save chao1224/e1248c07677c70a007338022d1ce1d45 to your computer and use it in GitHub Desktop.
Save chao1224/e1248c07677c70a007338022d1ce1d45 to your computer and use it in GitHub Desktop.
import numpy as np
import deepchem as dc
datasets = ['muv']
models = ['weave']
metrics = [dc.metrics.Metric(dc.metrics.roc_auc_score, np.mean),dc.metrics.Metric(dc.metrics.prc_auc_score, np.mean)]
for model in models:
print("RUNNING:",model)
dc.molnet.run_benchmark(datasets,model,test=True,metric=metrics)
datasets = ['qm9']
models = ['graphconvreg']
metrics = [
dc.metrics.Metric(dc.metrics.rms_score, np.mean),
dc.metrics.Metric(dc.metrics.mean_squared_error, np.mean),
dc.metrics.Metric(dc.metrics.mean_absolute_error, np.mean),
dc.metrics.Metric(dc.metrics.pearson_r2_score, np.mean),
dc.metrics.Metric(dc.metrics.r2_score, np.mean)
]
for model in models:
print("RUNNING:",model)
dc.molnet.run_benchmark(datasets,model,test=True,metric=metrics)
@chao1224
Copy link
Author

chao1224 commented May 8, 2019

QM9

gcnn

MoleculeNet MTL, run_benchmark Regenerated MTL, run_benchmark Regenerated MTL, examples
mu 0.583 0.590 1.038
alpha 1.370 2.532 4.611
homo 0.007 0.005 0.015
lumo 0.009 0.006 0.031
gap 0.001 0.008 0.033
r2 35.900 104.927 153.584
zpve 0.003 0.006 0.023
cv 3.410 1.298 3.047
u0 3.410 11.502 25.658
u298 3.410 11.514 25.660
h298 3.410 11.511 25.658
g298 0.650 11.517 25.663

mpnn

MoleculeNet MTL, run_benchmark Regenerated MTL, run_benchmark Regenerated MTL, examples
mu 0.358 0.177 1.158
alpha 0.890 0.444 1.441
homo 0.005 0.004 0.044
lumo 0.006 0.004 0.061
gap 0.008 0.005 0.069
r2 28.500 12.988 8.053
zpve 0.002 0.001 0.029
cv 2.050 0.232 1.068
u0 2.000 0.927 1.655
u298 2.020 0.928 1.698
h298 2.020 0.928 1.674
g298 0.420 0.928 1.670

dtnn

MoleculeNet MTL, run_benchmark Regenerated MTL, run_benchmark Regenerated MTL, examples
mu 0.024 0.212 --
alpha 0.950 0.485 --
homo 0.004 0.004 --
lumo 0.005 0.004 --
gap 0.007 0.005 --
r2 17.000 9.369 --
zpve 0.002 0.001 --
cv 2.430 0.162 --
u0 2.430 0.916 --
u298 2.430 0.916 --
h298 2.430 0.916 --
g298 0.270 0.916 --

@chao1224
Copy link
Author

chao1224 commented May 8, 2019

MUV

gcnn

MoleculeNet MTL, run_benchmark Regenerated MTL, run_benchmark Regenerated MTL, examples
MUV-466 -- 0.005 0.008
MUV-548 -- 0.062 0.002
MUV-600 -- 0.010 0.005
MUV-644 -- 0.011 0.009
MUV-652 -- 0.001 0.074
MUV-689 -- 0.014 0.002
MUV-692 -- 0.001 0.006
MUV-712 -- 0.001 0.065
MUV-713 -- 0.064 0.008
MUV-733 -- 0.012 0.004
MUV-737 -- 0.005 0.027
MUV-810 -- 0.008 0.006
MUV-832 -- 0.003 0.027
MUV-846 -- 0.167 0.024
MUV-852 -- 0.056 0.060
MUV-858 -- 0.009 0.006
MUV-859 -- 0.004 0.002
average 0.046 0.026 0.020

weave

MoleculeNet MTL, run_benchmark Regenerated MTL, run_benchmark Regenerated MTL, examples
MUV-466 -- 0.501 0.000
MUV-548 -- 0.500 0.000
MUV-600 -- 0.501 0.003
MUV-644 -- 0.501 0.003
MUV-652 -- 0.501 0.001
MUV-689 -- 0.502 0.001
MUV-692 -- 0.501 0.006
MUV-712 -- 0.500 0.005
MUV-713 -- 0.501 0.002
MUV-733 -- 0.502 0.004
MUV-737 -- 0.501 0.002
MUV-810 -- 0.501 0.001
MUV-832 -- 0.501 0.003
MUV-846 -- 0.500 0.003
MUV-852 -- 0.501 0.004
MUV-858 -- 0.502 0.002
MUV-859 -- 0.501 0.002
average 0.109 0.501 0.003

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment