One-Hot Encoding SMILES
Last updated
Last updated
One-Hot encoding is the processing of moving something that is built on some sort of language can be indexed appropriately with numbers. In machine learning, it is common to convert strings to numeric characters so the machine can work with the numbers. Most often there is an encoder to convert the strings, perform the machine learning, and then decode the numbers to check the performance of the machine learning.
Imports
Convert A List of SMILES to GlobalChem Encoder
Algorithm
In the code there is an index mapping of the the SMILES to the index and then convert to numpy array. Currently, the mapping is set to this to include polymeric SMILES, atom classes, and virtual atoms.