From ef76c077fd39d31fc795b842c32575f6afb9fdb2 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Sun, 9 Aug 2015 13:42:54 +0200 Subject: customized prediction algorithms implemented --- lib/dataset.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/dataset.rb') diff --git a/lib/dataset.rb b/lib/dataset.rb index 0447bb0..509e897 100644 --- a/lib/dataset.rb +++ b/lib/dataset.rb @@ -123,8 +123,7 @@ module OpenTox # @param feature [OpenTox::Feature] OpenTox Feature object # @return [Array] Data entry values def values(compound, feature) - #data_entries.where(:compound_id => compound.id, :feature_id => feature.id).distinct(:value) - rows = (0 ... compound_ids.length).select { |r| compound_ids[r] == compound.id } + rows = compound_ids.each_index.select{|r| compound_ids[r] == compound.id } col = feature_ids.index feature.id rows.collect{|row| data_entries[row][col]} end -- cgit v1.2.3