Unverified Commit 08080bc5 authored by Suzukazole's avatar Suzukazole
Browse files

added example

parent acd9ccfd
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -428,7 +428,23 @@ class DummyFeaturizer(Featurizer):
  This is useful when the raw dataset has to be used without
  featurizing the examples.


  Examples
  --------
  >>> import deepchem as dc
  >>> smi_map = [[
         "N#C[S-].O=C(CBr)c1ccc(C(F)(F)F)cc1>CCO.[K+]",
          "N#CSCC(=O)c1ccc(C(F)(F)F)cc1"
      ], [
          "C1COCCN1.FCC(Br)c1cccc(Br)n1>CCN(C(C)C)C(C)C.CN(C)C=O.O",
          "FCC(c1cccc(Br)n1)N1CCOCC1"
      ]]
  >>> Featurizer = dc.feat.DummyFeaturizer()
  >>> smi_feat = Featurizer.featurize(smi_map)
  >>> smi_feat
  array([['N#C[S-].O=C(CBr)c1ccc(C(F)(F)F)cc1>CCO.[K+]',
          'N#CSCC(=O)c1ccc(C(F)(F)F)cc1'],
         ['C1COCCN1.FCC(Br)c1cccc(Br)n1>CCN(C(C)C)C(C)C.CN(C)C=O.O',
          'FCC(c1cccc(Br)n1)N1CCOCC1']], dtype='<U55')
  """

  def featurize(self, datapoints: Iterable[Any],