From 85553b339acf3f9285a1c03b2fff342d9ddb9b6b Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 11 Jan 2017 16:00:07 +0100 Subject: documentation for all classes --- lib/classification.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/classification.rb') 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] dependent_variables + # @param [Array] 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] ||= [] -- cgit v1.2.3