class_docstr: The SCScore model is a neural network model based on the work of Coley et al. [1]_ that predicts the synthetic complexity score (SCScore) of molecules and correlates it with the expected number of reaction steps required to produce the given target molecule.
  It is trained on a dataset of over 12 million reactions from the Reaxys database to impose a pairwise inequality constraint enforcing that on average the products of published chemical reactions should be more synthetically complex than their corresponding reactants.
  The learned metric (SCScore) exhibits highly desirable nonlinear behavior, particularly in recognizing increases in synthetic complexity throughout a number of linear synthetic routes.
  The SCScore model can accurately predict the synthetic complexity of a variety of molecules, including both drug-like and natural product molecules.
  SCScore has the potential to be a valuable tool for chemists who are working on drug discovery and other areas of chemistry.
  
  The learned metric (SCScore) exhibits highly desirable nonlinear behavior, particularly in recognizing increases in synthetic complexity throughout a number of linear synthetic routes.
  
  Our model uses hingeloss instead of the shifted relu loss as in the supplementary material [2]_ provided by the author.
  This could cause differentiation issues with compounds that are "close" to each other in "complexity".
  
  References
  ----------
  .. [1] Coley, C. W., Rogers, L., Green, W., & Jensen, K. F. (2018). "SCScore: Synthetic Complexity Learned from a Reaction Corpus". Journal of Chemical Information and Modeling, 58(2), 252-261. https://doi.org/10.1021/acs.jcim.7b00622
  
  .. [2] Coley, C. W., Rogers, L., Green, W., & Jensen, K. F. (2018). Supplementary material to "SCScore: Synthetic Complexity Learned from a Reaction Corpus". Journal of Chemical Information and Modeling, 58(2), 252-261. https://github.com/connorcoley/scscore
code: def default_generator(
      self,
      dataset,
      epochs=1,
      mode="fit",
      deterministic=True,
      pad_batches=True,
  ):
      for epoch in range(epochs):
          for X_b, y_b, w_b, ids_b in dataset.iterbatches(
              batch_size=self.batch_size,
              deterministic=deterministic,
              pad_batches=pad_batches,
          ):
              yield ([X_b[:, 0], X_b[:, 1]], [y_b], [w_b])
  
file_path: deepchem/deepchem/models/scscore.py
imports: import numpy
  import tensorflow
  from deepchem.data import NumpyDataset
  from deepchem.feat import CircularFingerprint
  from deepchem.models import KerasModel
  from deepchem.models.losses import HingeLoss
  from tensorflow.keras.layers import Input, Dense, Dropout, Lambda
label_desc: Use image node_id 2 for calling the ScScoreModel obj's underlying member method code with example usage: obj.default_generator(dataset, epochs, mode, deterministic, pad_batches) without return types