diff options
author | gebele <gebele@in-silico.ch> | 2017-01-16 09:50:33 +0000 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2017-01-16 09:50:33 +0000 |
commit | 8266b2b447d8e138d5d5594f624a9f222e79f3ee (patch) | |
tree | f5c06159d0a529f263ea25f6354f89825fc41410 /lib/classification.rb | |
parent | 76912e72cf52c2a10423226ababb2b6d7f4b84ca (diff) | |
parent | d7504cc422bbaeee3546589d87e7baeb4e977c0b (diff) |
merge development
Diffstat (limited to 'lib/classification.rb')
-rw-r--r-- | lib/classification.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/classification.rb b/lib/classification.rb index e8c179f..638492b 100644 --- a/lib/classification.rb +++ b/lib/classification.rb @@ -1,9 +1,14 @@ module OpenTox module Algorithm + # Classification algorithms class Classification - def self.weighted_majority_vote dependent_variables:, independent_variables:nil, weights:, query_variables: + # Weighted majority vote + # @param [Array<TrueClass,FalseClass>] dependent_variables + # @param [Array<Float>] weights + # @return [Hash] + def self.weighted_majority_vote dependent_variables:, independent_variables:nil, weights:, query_variables:nil class_weights = {} dependent_variables.each_with_index do |v,i| class_weights[v] ||= [] |