Commit 4e65e13a authored by ZHENQIN WU's avatar ZHENQIN WU
Browse files

add time data

parent ddd8391b
Loading
Loading
Loading
Loading
+12 −12
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              |                |30             |
|           |graph convolution   |0.930              |0.819              |                |40             |
|muv        |logistic regression |0.910              |0.744              |400             |800            |
|           |tensorflow(MT-NN)   |0.980              |0.710              |                |800            |
|           |graph convolution   |0.881              |0.832              |                |1200           |
|           |tensorflow(MT-NN)   |0.987              |0.800              |30              |30             |
|           |graph convolution   |0.930              |0.819              |40              |40             |
|muv        |logistic regression |0.910              |0.744              |600             |800            |
|           |tensorflow(MT-NN)   |0.980              |0.710              |600             |800            |
|           |graph convolution   |0.881              |0.832              |800             |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             |                                         
|           |tensorflow(MT-NN)	 |0.949        	     |0.791              |1800            |7200           |                                         
|           |graph convolution   |0.866        	     |0.836              |2200            |20000          |                                         
|sider      |logistic regression |0.900        	     |0.620              |15              |40             |                                         
|           |tensorflow(MT-NN)	 |0.931        	     |0.647              |15              |60             |                                         
|           |graph convolution   |0.845        	     |0.646              |20              |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           |                                         
|           |tensorflow(MT-NN)	 |0.926        	     |0.705              |80              |2400           |                                         
|           |graph convolution   |0.906        	     |0.725              |80              |3000           |                                         


## Contributing to DeepChem
+32 −0
Original line number Diff line number Diff line
@@ -463,6 +463,38 @@ class TestOverfit(test_util.TensorFlowTestCase):
    scores = model.evaluate(dataset, [classification_metric])
    assert scores[classification_metric.name] > .9


  def test_tf_logreg_multitask_classification_overfit(self):
    """Test tf multitask overfits tiny data."""
    n_tasks = 10
    n_samples = 10
    n_features = 3
    n_classes = 2
    
    # Generate dummy dataset
    np.random.seed(123)
    ids = np.arange(n_samples)
    X = np.random.rand(n_samples, n_features)
    y = np.zeros((n_samples, n_tasks))
    w = np.ones((n_samples, n_tasks))
    dataset = dc.data.NumpyDataset(X, y, w, ids)

    verbosity = "high"
    classification_metric = dc.metrics.Metric(
      dc.metrics.accuracy_score, verbosity=verbosity, task_averager=np.mean)
    tensorflow_model = dc.models.TensorflowLogisticRegression(
        n_tasks, n_features, learning_rate=0.01, weight_init_stddevs=[.01],
        batch_size=n_samples, verbosity=verbosity)
    model = dc.models.TensorflowModel(tensorflow_model)

    # Fit trained model
    model.fit(dataset)
    model.save()

    # Eval model on train
    scores = model.evaluate(dataset, [classification_metric])
    assert scores[classification_metric.name] > .9

  def test_sklearn_multitask_regression_overfit(self):
    """Test SKLearn singletask-to-multitask overfits tiny regression data."""
    n_tasks = 2