Commit 8f0cd7b2 authored by Bharath Ramsundar's avatar Bharath Ramsundar
Browse files

Merge pull request #117 from joegomes/master

Quantum machine example
parents bb8603ab c086cd0c
Loading
Loading
Loading
Loading

datasets/gbd3k.pkl.gz

deleted100644 → 0
−405 KiB

File deleted.

datasets/gdb7k.pkl.gz

0 → 100644
+919 KiB

File added.

No diff preview for this file type.

+5 −2
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ import numpy as np
import warnings
from deepchem.utils.save import log
from sklearn.metrics import mean_squared_error
from sklearn.metrics import mean_absolute_error
from sklearn.metrics import roc_auc_score
from sklearn.metrics import r2_score
from sklearn.metrics import matthews_corrcoef
@@ -94,7 +95,7 @@ class Evaluator(object):
      colnames = ["task_name", "roc_auc_score", "matthews_corrcoef",
                  "recall_score", "accuracy_score"]
    elif task_type == "regression":
      colnames = ["task_name", "r2_score", "rms_error"]
      colnames = ["task_name", "r2_score", "rms_error", "mae"]
    else:
      raise ValueError("Unrecognized task type: %s" % task_type)

@@ -128,10 +129,12 @@ class Evaluator(object):
        try:
          r2s = r2_score(y, y_pred)
          rms = np.sqrt(mean_squared_error(y, y_pred))
          mae = mean_absolute_error(y, y_pred)
        except ValueError:
          r2s = np.nan
          rms = np.nan
        performance_df.loc[i] = [task_name, r2s, rms]
          mae = np.nan
        performance_df.loc[i] = [task_name, r2s, rms, mae]

    log("Saving predictions to %s" % csv_out, self.verbose)
    pred_y_df.to_csv(csv_out)
+655 −0

File added.

Preview size limit exceeded, changes collapsed.