Package CHEM :: Package ML :: Package nnRnn :: Package nearestNeighbors :: Module NearestNeighbors :: Class NearestNeighbors
[hide private]
[frames] | no frames]

Class NearestNeighbors



Instance Methods [hide private]
 
__init__(self, inputF, fpT, numN, pick, outputN, indicesF, idF)
 
readFingers(self, inputFile)
Creates a list of fingerprints (objects of FINGER.Finger) from the input file.
 
looSearch(self, S, fp, num)
Computes the similarities between fp and all molecules from S and outputs top num hits.
 
writeResults(self, fp, R, fileH)
Writes the output line for fp, in the format fp-id fp-class class-1:sim-1:1 ...
 
writeResults2(self, fp, R1, R2, fileH)
Writes the output line for fp, in the format fp-id fp-class class-1:sim-1:1 ...
 
retrieve(self)
Retrives the nearest neighbors as defined by the options.
Method Details [hide private]

writeResults(self, fp, R, fileH)

 
Writes the output line for fp, in the format
 fp-id fp-class class-1:sim-1:1 ... class-num:sim-num:num
where molecules 1-num are held by R.

This is for the case where the neighbors are 
computed independantly of the class.

writeResults2(self, fp, R1, R2, fileH)

 
Writes the output line for fp, in the format
 fp-id fp-class class-1:sim-1:1 ... class-num:sim-num:num
where molecules 1-num are held by R1 and R2.

This is for the case where the neighbors are 
computed first for actives and then for inactives.