http://api.toxbank.net/index.php?title=OpenTox_API_1.2_Report&feed=atom&action=history
OpenTox API 1.2 Report - Revision history
2024-03-29T06:07:35Z
Revision history for this page on the wiki
MediaWiki 1.17.0
http://api.toxbank.net/index.php?title=OpenTox_API_1.2_Report&diff=48&oldid=prev
Mrautenberg at 13:46, 2 September 2011
2011-09-02T13:46:07Z
<p></p>
<a href="http://api.toxbank.net/index.php?title=OpenTox_API_1.2_Report&diff=48&oldid=43">Show changes</a>
Mrautenberg
http://api.toxbank.net/index.php?title=OpenTox_API_1.2_Report&diff=43&oldid=prev
Mrautenberg: Created page with "== Related links == <div> {| class="plain" | Examples: a how-to with curl calls | <span class="Apple-style-span">http://opentox.informatik.uni-freiburg.de/validation/examples</..."
2011-08-29T16:27:50Z
<p>Created page with "== Related links == <div> {| class="plain" | Examples: a how-to with curl calls | <span class="Apple-style-span">http://opentox.informatik.uni-freiburg.de/validation/examples</..."</p>
<p><b>New page</b></p><div>== Related links ==<br />
<br />
<div><br />
<br />
{| class="plain"<br />
| Examples: a how-to with curl calls<br />
| <span class="Apple-style-span">http://opentox.informatik.uni-freiburg.de/validation/examples</span><br />
|-<br />
| Background information: validation workflow<br />
| <span class="Apple-style-span">[http://www.opentox.org/data/documents/development/validation/validation-and-reporting-overview-and-data-flow Validation and Reporting Overview and Data Flow]</span><br />
|-<br />
| Technical details: statistics computed by the validation<br />
| <span class="Apple-style-span">[http://www.opentox.org/data/documents/development/validation/validation-statistics Validation statistics]</span><br />
|-<br />
| Currently running validation web service<br /><br />
|<br />
<span class="Apple-style-span"></span>http://opentox.informatik.uni-freiburg.de/validation<br />
|-<br />
| Algorithm and Dataset Examples to validate<br /><br />
|<br />
[https://spreadsheets.google.com/spreadsheet/ccc?key=0AllBraSK8gV-dFgwUDJHaVJmQTlJRG1iTnJqNXBaZEE&hl=en_US&authkey=CJGPxMgB https://spreadsheets.google.com/spreadsheet/ccc?key=0AllBraSK8gV-dFgwUDJHaVJmQTlJRG1iTnJqNXBaZEE&amp;hl=en_US&amp;authkey=CJGPxMgB]<br />
|}<br />
<br />
</div><br />
<br />
== Validation ==<br />
<br />
=== Component description ===<br />
<br />
A validation corresponds to the validation of a model on a test dataset. The results are stored in another dataset. Parameters with default values are optional.<br />
<br />
=== REST operations ===<br />
<br />
{| class="plain"<br />
| '''Description'''<br />
| '''Method'''<br />
| '''URI'''<br />
| '''Parameters'''<br />
| '''Result'''<br />
| '''Status codes'''<br />
|-<br />
| Get all validations<br /><br />
| GET<br />
| /<br />
| '''[subjectid]'''<br />
| List of validation URIs<br />
| 200,404<br /><br />
|-<br />
| Retrieves a validation representation<br />
| GET<br />
| /{id}<br />
| '''[subjectid]'''<br />
| Validation representation in one of the supported MIME types<br /><br />
| 200,404<br />
|-<br />
| Validates a model on a test dataset<br /><br />
| POST<br />
| /test_set_validation<br />
| '''[subjectid]'''<br />'''model_uri'''<br />'''test_dataset_uri'''<br />'''test_target_dataset_uri''' (default = test_dataset_uri)<br />'''prediction_feature '''(default = dependent variable of model)<br /><br />
|<br />
[../AsyncTask#creating-a-task-post Validation URI or Task URI]<br /><br />
| 200,400,404,500<br />
|-<br />
| Builds a model on a training dataset and validates it on a test dataset<br /><br />
| POST<br /><br />
| /training_test_valdiation<br />
| '''algorithm_uri'''<br />'''prediction_feature'''<br />'''algorithm_params '''(string, default="")<br />'''training_dataset_uri'''<br />'''test_dataset_uri'''<br />'''test_target_dataset_uri''' (default = test_dataset_uri)<br />'''y_scramble''' (boolean, default=false)<br />''' y_scramble_seed '''(integer, default=1)<br />'''[subjectid]'''<br /><br />
|<br />
[../AsyncTask#creating-a-task-post Validation URI or Task URI]<br />
| 200,400,404,500<br />
|- class="odd"<br />
| Splits a dataset into training and test dataset according to a certain ratio, and performs a validation<br /><br />
| POST<br />
| /training_test_split<br />
| '''algorithm_uri'''<br />'''prediction_feature'''<br />'''algorithm_params''' (string, default="")<br />dataset_uri<br />'''split_ratio''' (float, default=0.66)<br />'''random_seed''' (integer, default=1)<br />'''y_scramble''' (boolean, default=false)<br />'''y_scramble_seed''' (integer, default=1)<br />'''[subjectid]'''<br /><br />
|<br />
[../AsyncTask#creating-a-task-post Validation URI or Task URI]<br />
| 200,400,404,500<br /><br />
|-<br />
| Performs a bootstrap validation<br /><br />
| POST<br />
| /bootstrapping<br />
| '''algorithm_uri'''<br />'''prediction_feature'''<br />'''dataset_params '''(string, default="")<br />'''dataset_uri'''<br />'''bootstrap_percentage''' (float, default=0.66)<br />'''random_seed''' (integer, default=1)<br />'''y_scramble''' (boolean, default=false)<br />'''y_scramble_seed''' (integer, default=1)<br />'''[subjectid]'''<br /><br />
|<br />
[../AsyncTask#creating-a-task-post Validation URI or Task URI]<br />
| 200,400,404,500<br />
|-<br />
| Directly perform a validation by specifying test- and prediction dataset<br />
| POST<br />
| /validate_datasets<br />
| '''prediction_feature'''<br />'''test_dataset_uri'''<br />'''test_target_dataset_uri '''(default = test_dataset_uri)<br />'''prediction_dataset_uri'''<br />'''predicted_feature''' (.i.e feature in prediction dataset)<br />'''[subjectid]'''<br />
|<br />
[../AsyncTask#creating-a-task-post Validation URI or Task URI]<br />
| 200,400,404,500<br />
|-<br />
| Deletes a validation.<br />
| DELETE<br />
| /{id}<br />
| '''[subjectid]'''<br />
| -<br /><br />
| 200,404<br />
|}<br />
<br />
=== Validation representation ===<br />
<br />
* Requested MIME type should be set in the requests "Accept" header, e.g. curl -X GET -H "Accept:application/xml" http://{server}/validation/{id}<br />
* RDF representation defined in [http://www.opentox.org/data/documents/development/RDF%20files/OpenToxOntology opentox.owl]<br />
* [http://www.opentox.org/data/documents/development/RDF%20files/Validation RDF Examples]<br />
* '''subjectid''' (optional) parameter that contains the OpenSSO A&amp;A token needed to access protected services.<br />
<br />
==== Supported MIME types: ====<br />
<br />
Mandatory:<br />
<br />
* application/rdf xml (default)<br />
<br />
Optional:<br />
<br />
* application/xml, see [http://www.opentox.org/data/documents/development/validation/ValidationResult.xsd XML schema definition for validation object]<br />
<br />
=== HTTP status codes ===<br />
<br />
{| class="plain"<br />
| '''Interpretation'''<br />
| '''Nr'''<br />
| '''Name'''<br />
|-<br />
| Success<br />
| 200<br />
| OK<br />
|-<br />
| Validation not found<br />
| 404<br />
| Not Found<br />
|-<br />
| Illegal model/algorithm/dataset/algorithm params<br />
| 400<br />
| Bad request<br />
|-<br />
| Validation/prediction error<br />
| 500<br />
| Internal Server Error<br />
|}<br />
<br />
== Cross-Validation ==<br />
<br />
=== Component description ===<br />
<br />
Performs a k-fold cross-validation, which results in k validations. Parameters with default values are optional.<br />
<br />
=== REST operations ===<br />
<br />
{| class="plain"<br />
| '''Description'''<br />
| '''Method'''<br />
| '''URI'''<br />
| '''Parameters'''<br />
| '''Result'''<br />
| '''Status codes'''<br />
|-<br />
| Get all cross-validations<br /><br />
| GET<br />
| /crossvalidation<br />
| '''[subjectid]'''<br />
| List of crossvalidation URIs<br />
| 200,404<br /><br />
|-<br />
| Retrieves a cross-validation representation<br />
| GET<br />
| /crossvalidation/{id}<br />
| '''[subjectid]'''<br />
| Cross-Validation in one of the supported MIME types<br /><br />
| 200,404<br />
|-<br />
| Returns all (k) validations that belong to a crossvalidation<br /><br />
| GET<br />
| /crossvalidation/{id}/validations<br />
| '''[subjectid]'''<br />
| List of validation URIs<br /><br />
| 200,404<br />
|-<br />
| Performs a k-fold cross-validation. <br /><br />
| POST<br /><br />
| /crossvalidation<br />
| '''algorithm_uri'''<br />'''prediction_feature'''<br />algorithm_params (string, default="")<br />'''num_folds '''(integer, default=10)<br />'''random_seed''' (integer, default=1)<br />'''stratified''' (boolean, default=true)<br />'''y_scramble''' (boolean, default=false)<br />'''y_scramble_seed''' (integer, default=1)<br />'''[subjectid]'''<br /><br />
|<br />
[../AsyncTask#creating-a-task-post Cross-Validation URI or Task URI]<br />
| 200,400,404,500<br />
|-<br />
| Performs a leave-one-out cross-validation. <br /><br />
| POST<br /><br />
| /crossvalidation/loo<br />
| '''algorithm_uri'''<br />'''prediction_feature'''<br />'''algorithm_params''' (string, default="")<br />'''y_scramble''' (boolean, default=false)<br />'''y_scramble_seed '''(integer, default=1)<br />'''[subjectid]'''<br /><br />
|<br />
[../AsyncTask#creating-a-task-post Cross-Validation URI or Task URI]<br />
| 200,400,404,500<br />
|-<br />
| Deletes a cross-validation.<br />
| DELETE<br />
| /crossvalidation/{id}<br />
| '''[subjectid]'''<br />
| -<br /><br />
| 200,404<br />
|}<br />
<br />
=== Cross-validation representation ===<br />
<br />
* Requested MIME type should be set in the requests "Accept" header, e.g. curl -X GET -H "Accept:application/xml" http://{server}/crossvalidation/{id}<br />
<br />
==== Supported MIME types: ====<br />
<br />
Mandatory:<br />
<br />
* application/rdf xml (default)<br />
<br />
Optional:<br />
<br />
* application/xml, see [http://www.opentox.org/data/documents/development/validation/CrossValidation.xsd XML schema definition for crossvalidation object<br />]<br />
<br />
=== HTTP status codes ===<br />
<br />
{| class="plain"<br />
| '''Interpretation'''<br />
| '''Nr'''<br />
| '''Name'''<br />
|-<br />
| Success<br />
| 200<br />
| OK<br />
|-<br />
| Cross validation not found<br />
| 404<br />
| Not Found<br />
|-<br />
| Illegal model/algorithm/dataset/algorithm params<br />
| 400<br />
| Bad request<br />
|-<br />
| Validation/prediction error<br />
| 500<br />
| Internal Server Error<br />
|}<br />
<br />
<div class="visualClear"></div><div class="visualClear"></div><br />
<br />
===== Document Actions =====<br />
<br />
== [#validation-report Validation - Report] ==<br />
<br />
=== Component description ===<br />
<br />
A report visualizes the (prediction) results of algorithms.<br />
<br />
=== REST operations ===<br />
<br />
{| class="plain"<br />
| '''Description'''<br />
| '''Method'''<br />
| '''URI'''<br />
| '''Parameters'''<br />
| '''Result'''<br />
| '''Status codes'''<br />
|-<br />
| Get all report types<br /><br />
| GET<br />
| /report<br />
| '''[subjectid]'''<br />
| List of available report types<br /><br />
| 200,404<br /><br />
|-<br />
| Get all reports for the particular report type<br /><br />
| GET<br />
| /report/{report-type}<br />
| '''[subjectid]'''<br />
| List of available reports as URI<br /><br />
| 200,404<br /><br />
|-<br />
| Retrieves a report, format according to accept-header<br />
| GET<br />
| /report/{report-type}/{id}<br />
| '''[subjectid]'''<br />
| According to accept-header:<br />'''text/x-yaml''', '''application/rdf xml'''<br />-&gt; report object with meta data (see rdf example below)<br /><br />'''text/xml''', '''text/html''', '''application/pdf'''<br />-&gt; report document in specified format<br /><br />
| 200,404<br />
|-<br />
| Creates a report<br /><br />
| POST<br />
| /report/{report-type}<br />
| ''various params, see below''<br />'''[subjectid]'''<br /><br />
|<br />
[../AsyncTask#creating-a-task-post Report URI or Task URI]<br />
| 200,400,404,500<br />
|-<br />
| Deletes a report.<br />
| DELETE<br />
| /report/{report-type}/{id}<br />
| '''[subjectid]'''<br />
| -<br /><br />
| 200,404<br />
|-<br />
| '''Available (validation-)report types'''<br /><br />
| <br /><br />
| <br /><br />
| <br /><br />
| <br /><br />
| <br /><br />
|-<br />
| Create single validation report<br />(one model, one test dataset)<br /><br />
| POST<br /><br />
| /report/validation<br />
| '''validation_uris''' (comma separated list of validation URIs)<br />'''[subjectid]'''<br /><br />
|<br />
[../AsyncTask#creating-a-task-post Report URI or Task URI]<br />
| 200,400,404,500<br />
|-<br />
| Create cross-validation report<br />(crossvalidation with one algorithm and one dataset)<br /><br />
| POST<br /><br />
| /report/crossvalidation<br />
| '''validation_uris''' (comma separated list of crossvalidation URIs)<br />'''[subjectid]'''<br /><br />
|<br />
[../AsyncTask#creating-a-task-post Report URI or Task URI]<br />
| 200,400,404,500<br />
|-<br />
| Create report for comparing different prediction algorithms<br />(crossvalidations/validations with multiple algorithms and datasets)<br /><br />
| POST<br /><br />
| /report/algorithm_comparison<br />
| '''validation_uris''' (comma separated list of crossvalidation URIs)<br />'''identifier''' (comma seperated list of string-ids, one for each crossvalidation-uri)<br />'''[subjectid]'''<br /><br />
|<br />
[../AsyncTask#creating-a-task-post Report URI or Task URI]<br />
| 200,400,404,500<br />
|}<br />
<br />
=== Output (file) format ===<br />
<br />
Validation reports are returned in 2 different ways according to the accept-header<br />
<br />
* Accept header is '''text/xml''',''' text/html''', '''application/pdf:''' the actual '''report document''' is returned (the core document is an XML format according to the [http://www.docbook.org/ DocBook] standard, which allows conversion to the other formats).<br />
* Accept header is '''application/rdf xml''' or '''text/x-yam'''l: the '''report object''' is returned, containing '''meta-data'''. Example (in N3) below<br />
<br />
@prefix : &lt;http://www.opentox.org/api/1.1#&gt; .<br />
@prefix rdf: &lt;http://www.w3.org/1999/02/22-rdf-syntax-ns#&gt; .<br />
<br />
&lt;http://opentox.informatik.uni-freiburg.de/validation/report/validation/8&gt;<br />
a :ValidationReport;<br />
:date "Wed Jun 09 13:23:28 0200 2010"^^&lt;http://www.w3.org/2001/XMLSchema#dateTime&gt;;<br />
:reportAlgorithm &lt;http://ambit.uni-plovdiv.bg:8080/ambit2/algorithm/LR&gt;;<br />
:reportModel &lt;http://ambit.uni-plovdiv.bg:8080/ambit2/model/359152&gt;;<br />
:reportType "validation"^^&lt;http://www.w3.org/2001/XMLSchema#string&gt;;<br />
:reportValidation &lt;http://opentox.informatik.uni-freiburg.de/validation/20&gt; .<br />
<br />
[http://www.opentox.org/data/documents/development/validation/ValidationResult.xsd ValidationResult.xsd]<br />
<br />
=== HTTP status codes ===<br />
<br />
{| class="plain"<br />
| '''Interpretation'''<br />
| '''Nr'''<br />
| '''Name'''<br />
|-<br />
| Success<br />
| 200<br />
| OK<br />
|-<br />
| Report type / report not found<br />
| 404<br />
| Not Found<br />
|-<br />
| Illegal params<br />
| 400<br />
| Bad request<br />
|-<br />
| Error creating the report<br /><br />
| 500<br />
| Internal Server Error<br />
|}</div>
Mrautenberg