Commit 9d9bd868 authored by Bharath Ramsundar's avatar Bharath Ramsundar
Browse files

Some more test fixes

parent 49199143
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ class TestFeaturizedSamples(unittest.TestCase):
                                smiles_field=self.smiles_field,
                                compound_featurizers=compound_featurizers,
                                complex_featurizers=complex_featurizers,
                                verbose=True)
                                verbosity="low")

    #Featurizes samples and transforms them into NumPy arrays suitable for ML.
    #returns an instance of class FeaturizedSamples()
+2 −2
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ import numpy as np

from tensorflow.python.platform import googletest

from deepchem.utils import metrics
from deepchem.metrics import kappa_score 


class MetricsTest(googletest.TestCase):
@@ -28,7 +28,7 @@ class MetricsTest(googletest.TestCase):
  def test_kappa_score(self):
    y_true = [1, 0, 1, 0]
    y_pred = [0.8, 0.2, 0.3, 0.4]  # [1, 0, 0, 0] with 0.5 threshold
    kappa = metrics.kappa_score(y_true, np.greater(y_pred, 0.5))
    kappa = kappa_score(y_true, np.greater(y_pred, 0.5))
    observed_agreement = 3.0 / 4.0
    expected_agreement = ((2 * 1) + (2 * 3)) / 4.0 ** 2
    expected_kappa = np.true_divide(observed_agreement - expected_agreement,