Commit e815db76 authored by ZHENQIN WU's avatar ZHENQIN WU
Browse files

update of time data

parent 6e02cd6e
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -206,20 +206,20 @@ different subclasses of ``Featurizer`` for convenience:
|Dataset    |Model               |Train score/ROC-AUC|Valid score/ROC-AUC|Time(loading)/s |Time(running)/s|
|-----------|--------------------|-------------------|-------------------|----------------|---------------| 
|tox21      |logistic regression |0.910              |0.759              |30              |30             |
|           |tensorflow(MT-NN)   |0.987              |0.800              |                |               |
|           |graph convolution   |0.930              |0.819              |                |               |
|           |tensorflow(MT-NN)   |0.987              |0.800              |                |30             |
|           |graph convolution   |0.930              |0.819              |                |40             |
|muv        |logistic regression |0.910              |0.744              |400             |800            |
|           |tensorflow(MT-NN)   |0.980              |0.710              |                |               |
|           |graph convolution   |0.881              |0.832              |                |               |
|pcba       |logistic regression |0.741        	     |0.719              |1800            |7200           |                                         
|           |tensorflow(MT-NN)	 |0.949        	     |0.791              |                |               |                                         
|           |graph convolution   |0.866        	     |0.836              |                |               |                                         
|sider      |logistic regression |0.900        	     |0.620              |20              |60             |                                         
|           |tensorflow(MT-NN)	 |0.931        	     |0.647              |                |               |                                         
|           |graph convolution   |0.845        	     |0.646              |                |               |                                         
|toxcast    |logistic regression |0.762        	     |0.622              |80              |2400           |                                         
|           |tensorflow(MT-NN)	 |0.926        	     |0.705              |                |               |                                         
|           |graph convolution   |0.906        	     |0.725              |                |               |                                         
|           |tensorflow(MT-NN)   |0.980              |0.710              |                |800            |
|           |graph convolution   |0.881              |0.832              |                |1200           |
|pcba       |logistic regression |0.759        	     |0.736              |1800            |5400           |                                         
|           |tensorflow(MT-NN)	 |0.949        	     |0.791              |                |7200           |                                         
|           |graph convolution   |0.866        	     |0.836              |                |20000          |                                         
|sider      |logistic regression |0.900        	     |0.620              |20              |40             |                                         
|           |tensorflow(MT-NN)	 |0.931        	     |0.647              |                |60             |                                         
|           |graph convolution   |0.845        	     |0.646              |                |60             |                                         
|toxcast    |logistic regression |0.762        	     |0.622              |80              |2000           |                                         
|           |tensorflow(MT-NN)	 |0.926        	     |0.705              |                |2400           |                                         
|           |graph convolution   |0.906        	     |0.725              |                |3000           |                                         


## Contributing to DeepChem
+3 −3
Original line number Diff line number Diff line
@@ -74,10 +74,10 @@ def benchmark_loading_datasets(base_dir_o, hyper_parameters,
    raise ValueError('Dataset not supported')
                          
  if model in ['graphconv']:
    method = 'GraphConv'
    featurize = 'GraphConv'
    n_features = 71
  elif model in ['tf','logreg','rf']:
    method = 'ECFP'
    featurize = 'ECFP'
    n_features = 1024
  else:
    raise ValueError('Model not supported')
@@ -100,7 +100,7 @@ def benchmark_loading_datasets(base_dir_o, hyper_parameters,
    
    time_start = time.time()
    #loading datasets     
    tasks,datasets,transformers = loading_functions[dname](method = method)
    tasks,datasets,transformers = loading_functions[dname](featurize=featurize)
    train_dataset, valid_dataset, test_dataset = datasets
    time_finish_loading = time.time()
    #time_finish_loading-time_start is the time(s) used for dataset loading
+6 −6
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ import numpy as np
import shutil
import deepchem as dc

def load_muv(method = 'ECFP'):
def load_muv(featurizer='ECFP'):
  """Load MUV datasets. Does not do train/test split"""
  # Load MUV dataset
  print("About to load MUV dataset.")
@@ -20,10 +20,10 @@ def load_muv(method = 'ECFP'):
  # Featurize MUV dataset
  print("About to featurize MUV dataset.")

  if method == 'ECFP':
      featurizer = dc.feat.CircularFingerprint(size=1024)
  elif method == 'GraphConv':
      featurizer = dc.feat.ConvMolFeaturizer()
  if featurizer == 'ECFP':
      featurizer_func = dc.feat.CircularFingerprint(size=1024)
  elif featurizer == 'GraphConv':
      featurizer_func = dc.feat.ConvMolFeaturizer()
      
  MUV_tasks = sorted(['MUV-692', 'MUV-689', 'MUV-846', 'MUV-859', 'MUV-644',
                      'MUV-548', 'MUV-852', 'MUV-600', 'MUV-810', 'MUV-712',
@@ -32,7 +32,7 @@ def load_muv(method = 'ECFP'):

  loader = dc.load.DataLoader(
      tasks=MUV_tasks, smiles_field="smiles",
      featurizer=featurizer, verbosity="high")
      featurizer=featurizer_func, verbosity="high")
  dataset = loader.featurize(dataset_file)

  # Initialize transformers 
+6 −6
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ import numpy as np
import shutil
import deepchem as dc

def load_nci(method = 'ECFP', shard_size=1000, num_shards_per_batch=4):
def load_nci(featurizer='ECFP', shard_size=1000, num_shards_per_batch=4):

  current_dir = os.path.dirname(os.path.realpath(__file__))

@@ -29,10 +29,10 @@ def load_nci(method = 'ECFP', shard_size=1000, num_shards_per_batch=4):

  # Featurize nci dataset
  print("About to featurize nci dataset.")
  if method == 'ECFP':
      featurizer = dc.feat.CircularFingerprint(size=1024)
  elif method == 'GraphConv':
      featurizer = dc.feat.ConvMolFeaturizer()
  if featurizer == 'ECFP':
      featurizer_func = dc.feat.CircularFingerprint(size=1024)
  elif featurizer == 'GraphConv':
      featurizer_func = dc.feat.ConvMolFeaturizer()

  all_nci_tasks = (['CCRF-CEM', 'HL-60(TB)', 'K-562', 'MOLT-4', 'RPMI-8226',
                    'SR', 'A549/ATCC', 'EKVX', 'HOP-62', 'HOP-92', 'NCI-H226',
@@ -49,7 +49,7 @@ def load_nci(method = 'ECFP', shard_size=1000, num_shards_per_batch=4):

  loader = dc.load.DataLoader(tasks=all_nci_tasks,
                     	      smiles_field="smiles",
	                      featurizer=featurizer,
	                      featurizer=featurizer_func,
        	              verbosity='high')

  dataset = loader.featurize(dataset_paths, shard_size=shard_size,
+6 −6
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ import numpy as np
import shutil
import deepchem as dc

def load_pcba(method = 'ECFP'):
def load_pcba(featurizer='ECFP'):
  """Load PCBA datasets. Does not do train/test split"""
  
  current_dir = os.path.dirname(os.path.realpath(__file__))
@@ -19,10 +19,10 @@ def load_pcba(method = 'ECFP'):
  
  # Featurize PCBA dataset
  print("About to featurize PCBA dataset.")
  if method == 'ECFP':
      featurizer = dc.feat.CircularFingerprint(size=1024)
  elif method == 'GraphConv':
      featurizer = dc.feat.ConvMolFeaturizer()
  if featurizer == 'ECFP':
      featurizer_func = dc.feat.CircularFingerprint(size=1024)
  elif featurizer == 'GraphConv':
      featurizer_func = dc.feat.ConvMolFeaturizer()
  PCBA_tasks = [
      'PCBA-1030','PCBA-1379','PCBA-1452','PCBA-1454','PCBA-1457',
      'PCBA-1458','PCBA-1460','PCBA-1461','PCBA-1468','PCBA-1469',
@@ -52,7 +52,7 @@ def load_pcba(method = 'ECFP'):

  loader = dc.load.DataLoader(tasks=PCBA_tasks,
                      	      smiles_field="smiles",
	                      featurizer=featurizer)
	                      featurizer=featurizer_func)
  
  dataset = loader.featurize(dataset_file)
  # Initialize transformers 
Loading