summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Gütlein <martin.guetlein@gmail.com>2010-04-20 16:06:20 +0200
committerMartin Gütlein <martin.guetlein@gmail.com>2010-04-20 16:06:20 +0200
commitd0977dfdb6067b134b43b401e68babf4049a4618 (patch)
tree561a3848c69218ebce70af6a612e58093399f9d3
parentdb5d9a399f39a768dd4f04f83c6f1b165dac2cd2 (diff)
add new nightly test
-rwxr-xr-xbin/redirect.sh4
-rw-r--r--nightly/nightly.rb44
-rw-r--r--nightly/nightly_application.rb1
-rw-r--r--validation/validation_test.rb16
4 files changed, 45 insertions, 20 deletions
diff --git a/bin/redirect.sh b/bin/redirect.sh
index 405a84d..0d34941 100755
--- a/bin/redirect.sh
+++ b/bin/redirect.sh
@@ -12,6 +12,8 @@ if [ -z $ERR ]; then
ERR="no error"
else
echo "ERROR" 1>&2
+ cmd="curl $1"
+ echo `$cmd 2> /dev/null`
exit 1
fi
@@ -24,7 +26,7 @@ if [ -z $RES ]; then
exit 0
else
#cat $OUTFILE
- RES=`grep "< Location: " $OUTFILE`
+ RES=`grep -a "< Location: " $OUTFILE`
RES=${RES//"< Location: "/} # remove lcoation spaces
echo $RES
fi
diff --git a/nightly/nightly.rb b/nightly/nightly.rb
index 871adf5..a085c30 100644
--- a/nightly/nightly.rb
+++ b/nightly/nightly.rb
@@ -19,7 +19,10 @@ class Nightly
OpenTox::Task.as_task do
LOGGER.info("Building nightly report.")
- benchmarks = [ HamsterTrainingTestBenchmark.new, MiniRegressionBenchmark.new ]
+ benchmarks = [ HamsterTrainingTestBenchmark.new,
+ MiniRegressionBenchmark.new,
+ FatheadRegressionBenchmark.new,
+ ]
running = []
report = Reports::XMLReport.new("Nightly Validation", Time.now.strftime("Created at %m.%d.%Y - %H:%M"))
@@ -49,10 +52,10 @@ class Nightly
benchmarks.each do |b|
section = report.add_section(report.get_root_element, b.title)
- section_about = report.add_section(section, "Info")
- b.info.each{|i| report.add_paragraph(section_about,i)}
+ section_info = report.add_section(section, "Info")
+ b.info.each{|i| report.add_paragraph(section_info,i)}
info_table = b.info_table
- report.add_table(section_about, b.info_table_title, info_table) if info_table
+ report.add_table(section_info, b.info_table_title, info_table) if info_table
section_results = report.add_section(section, "Results")
report.add_table(section_results, b.result_table_title, b.result_table)
@@ -205,9 +208,8 @@ class Nightly
class MiniRegressionBenchmark < TrainingTestValidationBenchmark
-
def title
- "Training test set validation, regression"
+ "Training test set validation, small regression dataset"
end
def info
@@ -219,16 +221,38 @@ class Nightly
@algs = [ "http://opentox.ntua.gr:3000/algorithm/mlr",
"http://opentox.informatik.tu-muenchen.de:8080/OpenTox-dev/algorithm/kNNregression"]
@alg_params = [nil, nil]
- #@pred_feature = "http://apps.ideaconsult.net:8080/ambit2/feature/22200"
- #@train_data = "http://apps.ideaconsult.net:8080/ambit2/dataset/54"
- #@test_data = "http://apps.ideaconsult.net:8080/ambit2/dataset/55"
-
@train_data = "http://ambit.uni-plovdiv.bg:8080/ambit2/dataset/342"
@test_data = "http://ambit.uni-plovdiv.bg:8080/ambit2/dataset/342"
@pred_feature = "http://ambit.uni-plovdiv.bg:8080/ambit2/feature/103141"
super
end
end
+
+ class FatheadRegressionBenchmark < TrainingTestValidationBenchmark
+
+ def title
+ "Training test set validation, regression with fathead minnow dataset"
+ end
+
+ def info
+ res = [ "This is the regression use case used in D2.2."+
+ "The task is to predict LC50 values of the well known Fathead Minnow Acute Toxicity dataset."+
+ "JOELIB was used to compute numerical descriptors as features." ] + super
+ return res
+ end
+
+ def build()
+ @algs = [
+ "http://opentox.informatik.tu-muenchen.de:8080/OpenTox-dev/algorithm/kNNregression",
+ "http://opentox.informatik.tu-muenchen.de:8080/OpenTox-dev/algorithm/M5P",
+ "http://opentox.informatik.tu-muenchen.de:8080/OpenTox-dev/algorithm/GaussP"]
+ @alg_params = [nil, nil, nil]
+ @train_data = "http://ambit.uni-plovdiv.bg:8080/ambit2/dataset/639"
+ @test_data = "http://ambit.uni-plovdiv.bg:8080/ambit2/dataset/640"
+ @pred_feature = "http://ambit.uni-plovdiv.bg:8080/ambit2/feature/264185"
+ super
+ end
+ end
class HamsterTrainingTestBenchmark < TrainingTestValidationBenchmark
diff --git a/nightly/nightly_application.rb b/nightly/nightly_application.rb
index 35d4153..b536ed5 100644
--- a/nightly/nightly_application.rb
+++ b/nightly/nightly_application.rb
@@ -11,7 +11,6 @@ get '/css_style_sheet/?' do
end
get '/nightly/?' do
- LOGGER.info "get nightly"
content_type "text/html"
rep = Nightly.get_nightly
if rep.is_a?(File)
diff --git a/validation/validation_test.rb b/validation/validation_test.rb
index 276fa6d..0618ec5 100644
--- a/validation/validation_test.rb
+++ b/validation/validation_test.rb
@@ -19,8 +19,8 @@ class ValidationTest < Test::Unit::TestCase
def test_it
- #Nightly.build_nightly
- get "/build_nightly"
+ Nightly.build_nightly
+ #get "/build_nightly"
#get "/nightly"
#get '1',nil,'HTTP_ACCEPT' => "application/rdf+xml"
#puts last_response.body
@@ -171,14 +171,14 @@ class ValidationTest < Test::Unit::TestCase
#ex.alg = "http://opentox.informatik.tu-muenchen.de:8080/OpenTox-dev/algorithm/GaussP"
#mini
- ex.train_data = "http://ambit.uni-plovdiv.bg:8080/ambit2/dataset/342"
- ex.test_data = "http://ambit.uni-plovdiv.bg:8080/ambit2/dataset/342"
- ex.act_feat = "http://ambit.uni-plovdiv.bg:8080/ambit2/feature/103141"
+ #ex.train_data = "http://ambit.uni-plovdiv.bg:8080/ambit2/dataset/342"
+ #ex.test_data = "http://ambit.uni-plovdiv.bg:8080/ambit2/dataset/342"
+ #ex.act_feat = "http://ambit.uni-plovdiv.bg:8080/ambit2/feature/103141"
#big
- #ex.train_data = "http://ambit.uni-plovdiv.bg:8080/ambit2/dataset/639"
- #ex.test_data = "http://ambit.uni-plovdiv.bg:8080/ambit2/dataset/640"
- #ex.act_feat = "http://ambit.uni-plovdiv.bg:8080/ambit2/feature/264185"
+ ex.train_data = "http://ambit.uni-plovdiv.bg:8080/ambit2/dataset/639"
+ ex.test_data = "http://ambit.uni-plovdiv.bg:8080/ambit2/dataset/640"
+ ex.act_feat = "http://ambit.uni-plovdiv.bg:8080/ambit2/feature/264185"
#ex.act_feat = "http://ambit.uni-plovdiv.bg:8080/ambit2/feature/264187" #test
# example model