summaryrefslogtreecommitdiff
path: root/lib/feature_selection.rb
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2017-01-18 14:17:02 +0000
committergebele <gebele@in-silico.ch>2017-01-18 14:17:02 +0000
commitdd8b986e198552ce865aa5500335043f60a0eef3 (patch)
treef5c06159d0a529f263ea25f6354f89825fc41410 /lib/feature_selection.rb
parent76912e72cf52c2a10423226ababb2b6d7f4b84ca (diff)
parentd7504cc422bbaeee3546589d87e7baeb4e977c0b (diff)
fixed merge
Diffstat (limited to 'lib/feature_selection.rb')
-rw-r--r--lib/feature_selection.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/feature_selection.rb b/lib/feature_selection.rb
index 65f9752..c596b1f 100644
--- a/lib/feature_selection.rb
+++ b/lib/feature_selection.rb
@@ -1,13 +1,16 @@
module OpenTox
module Algorithm
+ # Feature selection algorithms
class FeatureSelection
+ # Select features correlated to the models prediction feature
+ # @param [OpenTox::Model::Lazar]
def self.correlation_filter model
relevant_features = {}
R.assign "dependent", model.dependent_variables.collect{|v| to_r(v)}
model.descriptor_weights = []
- selected_variables = []
+ selected_variables = []
selected_descriptor_ids = []
model.independent_variables.each_with_index do |v,i|
v.collect!{|n| to_r(n)}