diff options
author | Andreas Maunz <andreas@maunz.de> | 2011-05-25 15:04:50 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2011-05-25 15:04:50 +0200 |
commit | ca6dd87b7c80611c4f4e4716f68fe6633ce1066b (patch) | |
tree | fb180e450603c048d2a2ed3549e247bf95c12ede /lib/model.rb | |
parent | 3f209f75a2abe2b8a89df3afcb3f54ec8329a5e1 (diff) |
4th v
Diffstat (limited to 'lib/model.rb')
-rw-r--r-- | lib/model.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/model.rb b/lib/model.rb index f4df8ea..6a4602f 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -176,8 +176,7 @@ module OpenTox return @prediction_dataset if database_activity(subjectid) - - if metadata[RDF.type] == [OTA.ClassificationLazySingleTarget] + if metadata[RDF.type].include?([OTA.ClassificationLazySingleTarget][0]) # AM: searching in metadata for classification # AM: Balancing, see http://www.maunz.de/wordpress/opentox/2011/balanced-lazar l = Array.new # larger s = Array.new # smaller fraction @@ -231,7 +230,7 @@ module OpenTox @neighbors=neighbors_best ### END AM balanced predictions - else # regression case: no balancing + else # no balancing as before neighbors props = get_props prediction = eval("#{@prediction_algorithm}(@neighbors,{:similarity_algorithm => @similarity_algorithm, :p_values => @p_values})") |