class_docstr: Mol2Vec fingerprints.
  
  This class convert molecules to vector representations by using Mol2Vec.
  Mol2Vec is an unsupervised machine learning approach to learn vector representations
  of molecular substructures and the algorithm is based on Word2Vec, which is
  one of the most popular technique to learn word embeddings using neural network in NLP.
  Please see the details from [1]_.
  
  The Mol2Vec requires the pretrained model, so we use the model which is put on the mol2vec
  github repository [2]_. The default model was trained on 20 million compounds downloaded
  from ZINC using the following paramters.
  
  - radius 1
  - UNK to replace all identifiers that appear less than 4 times
  - skip-gram and window size of 10
  - embeddings size 300
  
  References
  ----------
  .. [1] Jaeger, Sabrina, Simone Fulle, and Samo Turk. "Mol2vec: unsupervised machine learning
      approach with chemical intuition." Journal of chemical information and modeling 58.1 (2018): 27-35.
  .. [2] https://github.com/samoturk/mol2vec/
  
  Note
  ----
  This class requires mol2vec to be installed.
  
  Examples
  --------
  >>> import deepchem as dc
  >>> from rdkit import Chem
  >>> smiles = ['CCC']
  >>> featurizer = dc.feat.Mol2VecFingerprint()
  >>> features = featurizer.featurize(smiles)
  >>> type(features)
  <class 'numpy.ndarray'>
  >>> features[0].shape
  (300,)
class_docstr_tok: ["Mol2Vec","fingerprints",".","This","class","convert","molecules","to","vector","representations","by","using","Mol2Vec",".","Mol2Vec","is","an","unsupervised","machine","learning","approach","to","learn","vector","representations","of","molecular","substructures","and","the","algorithm","is","based","on","Word2Vec",",","which","is","one","of","the","most","popular","technique","to","learn","word","embeddings","using","neural","network","in","NLP",".","Please","see","the","details","from","[","1","]","_",".","The","Mol2Vec","requires","the","pretrained","model",",","so","we","use","the","model","which","is","put","on","the","mol2vec","github","repository","[","2","]","_",".","The","default","model","was","trained","on","20","million","compounds","downloaded","from","ZINC","using","the","following","paramters",".","-","radius","1","-","UNK","to","replace","all","identifiers","that","appear","less","than","4","times","-","skip-gram","and","window","size","of","10","-","embeddings","size","300","References","--","--","--","--","--","..","[","1","]","Jaeger",",","Sabrina",",","Simone","Fulle",",","and","Samo","Turk",".","``","Mol2vec",":","unsupervised","machine","learning","approach","with","chemical","intuition",".","''","Journal","of","chemical","information","and","modeling","58.1","(","2018",")",":","27-35",".","..","[","2","]","https",":","\/\/github.com\/samoturk\/mol2vec\/","Note","--","--","This","class","requires","mol2vec","to","be","installed",".","Examples","--","--","--","--",">",">",">","import","deepchem","as","dc",">",">",">","from","rdkit","import","Chem",">",">",">","smiles","=","[","'CCC","'","]",">",">",">","featurizer","=","dc.feat.Mol2VecFingerprint","(",")",">",">",">","features","=","featurizer.featurize","(","smiles",")",">",">",">","type","(","features",")","<","class","'numpy.ndarray","'",">",">",">",">","features","[","0","]",".shape","(","300",",",")"]
docstr: Generate vectors for each sentence (list) in a list of sentences. Vector is simply a
  sum of vectors for individual words.
  
  Parameters
  ----------
  sentences : list, array
      List with sentences
  model : word2vec.Word2Vec
      Gensim word2vec model
  unseen : None, str
      Keyword for unseen words. If None, those words are skipped.
      https://stats.stackexchange.com/questions/163005/how-to-set-the-dictionary-for-text-analysis-using-neural-networks/163032#163032
  Returns
  -------
  np.array
docstr_tok: ["Generate","vectors","for","each","sentence","(","list",")","in","a","list","of","sentences",".","Vector","is","simply","a","sum","of","vectors","for","individual","words",".","Parameters","--","--","--","--","--","sentences",":","list",",","array","List","with","sentences","model",":","word2vec.Word2Vec","Gensim","word2vec","model","unseen",":","None",",","str","Keyword","for","unseen","words",".","If","None",",","those","words","are","skipped",".","https",":","\/\/stats.stackexchange.com\/questions\/163005\/how-to-set-the-dictionary-for-text-analysis-using-neural-networks\/163032","#","163032","Returns","--","--","--","-","np.array"]
code: def sentences2vec(
      self, sentences: list, model, unseen=None
  ) -> np.ndarray:
      """Generate vectors for each sentence (list) in a list of sentences. Vector is simply a
      sum of vectors for individual words.
  
      Parameters
      ----------
      sentences : list, array
          List with sentences
      model : word2vec.Word2Vec
          Gensim word2vec model
      unseen : None, str
          Keyword for unseen words. If None, those words are skipped.
          https://stats.stackexchange.com/questions/163005/how-to-set-the-dictionary-for-text-analysis-using-neural-networks/163032#163032
      Returns
      -------
      np.array
  
      """
      keys = set(model.wv.key_to_index.keys())
      vec = []
      if unseen:
          unseen_vec = model.wv.get_vector(unseen)
  
      for sentence in sentences:
          if unseen:
              vec.append(
                  sum(
                      [
                          model.wv.get_vector(y)
                          if y in set(sentence) & keys
                          else unseen_vec
                          for y in sentence
                      ]
                  )
              )
          else:
              vec.append(
                  sum(
                      [
                          model.wv.get_vector(y)
                          for y in sentence
                          if y in set(sentence) & keys
                      ]
                  )
              )
      return np.array(vec)
  
file_path: deepchem/deepchem/feat/molecule_featurizers/mol2vec_fingerprint.py
imports: from os import path
  from typing import Optional
  import numpy
  from rdkit.Chem import AllChem
  from deepchem.utils import download_url, get_data_dir, untargz_file
  from deepchem.utils.typing import RDKitMol
  from deepchem.feat.base_classes import MolecularFeaturizer
label_desc: Use image node_id 2 for calling the Mol2VecFingerprint obj's underlying member method code with example usage: obj.sentences2vec(sentences, model, unseen) and returns: np