summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2012-05-21 16:28:16 +0200
committerAndreas Maunz <andreas@maunz.de>2012-05-21 16:28:16 +0200
commit0d8141443f36a22f9442362aa633c473f8b9e485 (patch)
tree074a5e141312845c3846a008a727f137b83a9249
parent2ffd6d893a363ebd30b357fafb43484c0bf56417 (diff)
Fixed read-in of smiles for fminer
-rw-r--r--lib/algorithm.rb2
-rw-r--r--lib/utils.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/algorithm.rb b/lib/algorithm.rb
index 54bb371..f27baa5 100644
--- a/lib/algorithm.rb
+++ b/lib/algorithm.rb
@@ -96,7 +96,7 @@ module OpenTox
@training_dataset.compounds.each do |compound|
entry=@training_dataset.data_entries[compound]
begin
- smiles = OpenTox::Compound.smiles(compound.to_s)
+ smiles = OpenTox::Compound.new(compound).to_smiles
rescue
LOGGER.warn "No resource for #{compound.to_s}"
next
diff --git a/lib/utils.rb b/lib/utils.rb
index f6f8a4a..e04199d 100644
--- a/lib/utils.rb
+++ b/lib/utils.rb
@@ -467,8 +467,8 @@ module OpenTox
end
- # Effect calculation for classification
- # @param [Array] Array of occurrences per class in the form of Enumerables.
+ # Effect calculation for classification. It is assumed that the elements of the arrays match each other pairwise
+ # @param [Array] Array of occurrences per class (in the form of Enumerables).
# @param [Array] Array of database instance counts per class.
def self.effect(occurrences, db_instances)
max=0