diff options
author | mguetlein <martin.guetlein@gmail.com> | 2011-05-26 15:22:18 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2011-05-26 15:22:18 +0200 |
commit | e26abb0026c611a75da6a0484003d50c1961804f (patch) | |
tree | 6dc648b374a61bbd3f92e89fc571aca9a63c5b16 /validation.rb | |
parent | e28863129af071e25ec581b46c4160aaba75c33d (diff) |
fix validation test for small datasets and a&a
Diffstat (limited to 'validation.rb')
-rw-r--r-- | validation.rb | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/validation.rb b/validation.rb index 0ff3c15..fe62782 100644 --- a/validation.rb +++ b/validation.rb @@ -181,7 +181,8 @@ class ValidationTest < Test::Unit::TestCase p = { :dataset_uri => data[:data], :algorithm_uri => File.join(CONFIG[:services]["opentox-algorithm"],"lazar"), - :algorithm_params => "feature_generation_uri="+File.join(CONFIG[:services]["opentox-algorithm"],"fminer/"+fminer), + :algorithm_params => "feature_generation_uri="+File.join(CONFIG[:services]["opentox-algorithm"],"fminer/"+fminer)+ + (data[:info] =~ /mini/ ? ";backbone=false;min_chisq_significance=0.0" : ""), :prediction_feature => data[:feat], :num_folds => 10 } #:num_folds => 2 } @@ -216,8 +217,17 @@ class ValidationTest < Test::Unit::TestCase cv_list = OpenTox::Crossvalidation.list( {:algorithm => algorithm} ) assert cv_list.include?(cv.uri) cv_list.each do |cv_uri| - alg = OpenTox::Crossvalidation.find(cv_uri).metadata[OT.algorithm] - assert alg==algorithm,"wrong algorithm for filtered crossvalidation, should be: '"+algorithm.to_s+"', is: '"+alg.to_s+"'" + begin + alg = OpenTox::Crossvalidation.find(cv_uri, @@subjectid).metadata[OT.algorithm] + assert alg==algorithm,"wrong algorithm for filtered crossvalidation, should be: '"+algorithm.to_s+"', is: '"+alg.to_s+"'" + rescue OpenTox::RestCallError => e + raise "error Report of RestCallError is no errorReport: "+e.errorCause.class.to_s+":\n"+e.errorCause.to_yaml unless e.errorCause.is_a?(OpenTox::ErrorReport) + report = e.errorCause + while report.errorCause + report = report.errorCause + end + assert_equal report.errorType,OpenTox::NotAuthorizedError.to_s + end end puts cv.uri unless @@delete |