Package CHEM :: Package ML :: Package features :: Module AtomCountExtractor :: Class AtomCountExtractor
[hide private]
[frames] | no frames]

Class AtomCountExtractor



BaseFeatureExtractor.BaseFeatureExtractor --+
                                            |
                                           AtomCountExtractor

Simple extractor just for testing purposes, essentially developing a molecular formula as a molecule feature vector.

Conceptually develops a feature vector with one cell per element of the periodic table, with values equal to the number of times the respective element appears for a given input molecule.

Specifically develops a feature dictionary for molecules keyed by the atomic symbols ("C","N","O","H","Br","Cl",etc.) with respective count values.

Instance Methods [hide private]
 
__init__(self)
Default constructor, modifies attributes to interpret as *molecule* feature extractor.
 
__call__(self, obj)
Create feature dictionary from input object.
 
objectDescription(self, obj)
Input is a molecule object, just return the canonical SMILES representation
 
getNameID(self, obj)
Input is a molecule object, return the molecule's Title property

Inherited from BaseFeatureExtractor.BaseFeatureExtractor: loadArgs, loadOptions, main, outputFeatures

Class Variables [hide private]

Inherited from BaseFeatureExtractor.BaseFeatureExtractor: inputFunction, inputIter, outFile, parser

Method Details [hide private]

__init__(self)
(Constructor)

 
Default constructor, modifies attributes to interpret as *molecule* feature extractor.
Overrides: BaseFeatureExtractor.BaseFeatureExtractor.__init__

__call__(self, obj)
(Call operator)

 

Create feature dictionary from input object.

Create a dictionary keyed by the atomic symbols that exist in the input object, with values equal to the counts of how many times each of those atoms appear in the molecule.
Overrides: BaseFeatureExtractor.BaseFeatureExtractor.__call__

objectDescription(self, obj)

 
Input is a molecule object, just return the canonical SMILES representation
Overrides: BaseFeatureExtractor.BaseFeatureExtractor.objectDescription

getNameID(self, obj)

 
Input is a molecule object, return the molecule's Title property
Overrides: BaseFeatureExtractor.BaseFeatureExtractor.getNameID