diff options
author | Andreas Maunz <andreas@maunz.de> | 2011-05-26 13:36:57 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2011-05-26 13:36:57 +0200 |
commit | 852eef754518633f4a918aa1876ec3c4ac12ac57 (patch) | |
tree | 5b149845fb5fed265b04815f79fc2ebe0f3e8199 /lib/model.rb | |
parent | 065fdeb351f68d0445b66516ccf8e7cfcc7e2a1f (diff) | |
parent | f507227fd4efff3c8b32b2a8c8f2860af2546e3b (diff) |
Merge branch 'development' into svm_matrix
Conflicts:
lib/model.rb
Diffstat (limited to 'lib/model.rb')
-rw-r--r-- | lib/model.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/model.rb b/lib/model.rb index d63eef2..7c2ef58 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -179,10 +179,12 @@ module OpenTox load_metadata(subjectid) case OpenTox::Feature.find(metadata[OT.dependentVariables]).feature_type when "classification" - # AM: Balancing, see http://www.maunz.de/wordpress/opentox/2011/balanced-lazar l = Array.new # larger s = Array.new # smaller fraction + + raise "no fingerprints in model" if @fingerprints.size==0 + @fingerprints.each do |training_compound,training_features| @activities[training_compound].each do |act| case act.to_s @@ -233,7 +235,7 @@ module OpenTox @neighbors=neighbors_best ### END AM balanced predictions - else # no balancing as before + else # regression case: no balancing LOGGER.info "LAZAR: Unbalanced." neighbors (@prediction_algorithm.include? "svm" and params[:prop_kernel] == "true") ? props = get_props : props = nil |