summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Gütlein <martin.guetlein@gmail.com>2009-12-02 10:31:24 +0100
committerMartin Gütlein <martin.guetlein@gmail.com>2009-12-02 10:31:24 +0100
commitc647dd756a74bbd2ad61b2e8158d6afe7a175965 (patch)
tree4d4b32d934bd0039cb43d53b69bf1d1e9f63eef3
parent3b57006e49a3f77025c80bd73072f1f4f3d9e261 (diff)
minor changes
-rw-r--r--EXAMPLES46
-rw-r--r--README8
-rw-r--r--application.rb2
3 files changed, 49 insertions, 7 deletions
diff --git a/EXAMPLES b/EXAMPLES
index 8a9f262..e6310dd 100644
--- a/EXAMPLES
+++ b/EXAMPLES
@@ -1,21 +1,26 @@
API-Definition
====================================
-see http://www.opentox.org/dev/apis
+see http://opentox.org/dev/apis/api-1.1/Validation
API-Examples
====================================
+how to
+------------------------------------
+the examples listed below can be performed with the command line tool curl
+
+
get list of available validations
------------------------------------
>>> curl <validation_service>/validations
-result (accept-header: application/rdf-xml)
+result example (accept-header: application/rdf-xml)
<<< TODO
-result (accept-header: text/uri-list)
+result example (accept-header: text/uri-list)
<<< <validation_service>/validation/<validation_id>
<<< <validation_service>/validation/validation_id_i
<<< <validation_service>/validation/validation_id_j
@@ -27,17 +32,48 @@ validate model on test-dateset
-d dataset_uri="<dataset_service>/dataset/<dataset_id>" \
<validation_service>/validation
-result (accept-header: application/rdf-xml)
+result example (accept-header: application/rdf-xml)
<<< TODO
-result (accept-header: text/uri-list)
+result example (accept-header: text/uri-list)
<<< <validation_service>/validation/<id>
validate an algorithm on a training- and test-dataset
------------------------------------
+>>> curl -X POST -d algorithm_uri="<model_service>/model/<model_id>" \
+ -d training_dataset_uri="<dataset_service>/dataset/<dataset_id>" \
+ -d test_dataset_uri="<dataset_service>/dataset/<dataset_id>" \
+ -d prediction_feature="<prediction_feature>" \
+ <validation_service>/validation
+
+result example (accept-header: application/rdf-xml)
+<<< TODO
+
+result example (accept-header: text/uri-list)
+<<< <validation_service>/validation/<id>
+
+
+validate an algorithm on a dataset via training-test-split
+------------------------------------
+
+>>> curl -X POST -d algorithm_uri="<model_service>/model/<model_id>" \
+ -d dataset_uri="<dataset_service>/dataset/<dataset_id>" \
+ -d prediction_feature="<prediction_feature>" \
+ -d split_ratio=0.9 \
+ -d random_seed=2 \
+ <validation_service>/validation/training-test-split
+
+optional params:
+split_ratio, default is 0.67
+random_seed, default is 1
+
+result example (accept-header: application/rdf-xml)
+<<< TODO
+result example (accept-header: text/uri-list)
+<<< <validation_service>/validation/<id>
diff --git a/README b/README
index 927f045..80d390f 100644
--- a/README
+++ b/README
@@ -1,4 +1,10 @@
OpenTox Validation
==================
-* An OpenTox REST Webservice
+* An OpenTox REST Webservice for validation and reporting
+
+* see http://opentox.org/dev/apis/api-1.1/Validation for a current version of the API
+
+* online test-service not yet available
+
+* see EXAMPLES file for examples using curl, a version without placeholders (in <> brackets) will be available soon
diff --git a/application.rb b/application.rb
index 5c1d027..d1cc2b7 100644
--- a/application.rb
+++ b/application.rb
@@ -7,7 +7,7 @@ load "report/report_application.rb"
require lib
end
-get '/?' do
+get '/examples/?' do
transform_example
end