API-Definition =================================================================== see http://opentox.org/dev/apis/api-1.1/Validation API-Examples Validation =================================================================== how to ------------------------------------------------------------------- the examples listed below can be performed with the command line tool curl get list of available validations ------------------------------------------------------------------- >>> curl result example (accept-header: application/rdf-xml) <<< not yet supported result example (accept-header: text/uri-list) <<< / <<< /validation_id_i <<< /validation_id_j search available validations with url-encoded parameters ------------------------------------------------------------------- >>> curl ?training_dataset_uri=&algorithm_uri= Hint: you can perform a pattern search (instead of an exact match search) by adding a _like to the parameter, i.e. training_dataset_uri_like result example (accept-header: application/rdf-xml) <<< not yet supported result example (accept-header: text/uri-list) <<< / <<< /validation_id_i <<< /validation_id_j get validation ------------------------------------------------------------------- >>> curl / supported accept-headers: "text/x-yaml" and "application/rdf-xml" validate model on test-dateset ------------------------------------------------------------------- >>> curl -X POST -d model_uri="" \ -d test_dataset_uri="" \ -d test_target_dataset_uri="" \ optional params: test_target_dataset_uri, default is test_dataset_uri result example (accept-header: application/rdf-xml) <<< not yet supported result example (accept-header: text/uri-list) <<< /id_i validate an algorithm on a training- and test-dataset ------------------------------------------------------------------- >>> curl -X POST -d algorithm_uri="" \ -d training_dataset_uri="" \ -d test_dataset_uri="" \ -d test_target_dataset_uri="" \ -d prediction_feature="" \ -d algorithm_params="" \ optional params: algorithm_params, default is empty test_target_dataset_uri, default is test_dataset_uri result example (accept-header: application/rdf-xml) <<< not yet supported result example (accept-header: text/uri-list) <<< /id_i create a validation by comparing feature values ----------------------------------------------------- >>> curl -X POST -d test_dataset_uri="" \ -d test_target_dataset_uri="" \ -d prediction_dataset_uri="" \ -d prediction_feature="" \ -d predicted_feature="" \ -d classification="true" \ /validate_datasets optional params: test_target_dataset_uri, default is test_dataset_uri regression or classification has to be specified result example (accept-header: text/uri-list) <<< /id_i validate an algorithm on a dataset via training-test-split ------------------------------------------------------------------- >>> curl -X POST -d algorithm_uri="" \ -d dataset_uri="" \ -d prediction_feature="" \ -d algorithm_params="" \ -d split_ratio=0.9 \ -d random_seed=2 \ /training_test_split optional params: algorithm_params, default is empty split_ratio, default is 0.67 random_seed, default is 1 result example (accept-header: application/rdf-xml) <<< not yet supported result example (accept-header: text/uri-list) <<< /id_i get list of available crossvalidations ------------------------------------------------------------------- >>> curl /crossvalidation result example (accept-header: application/rdf-xml) <<< not yet supported result example (accept-header: text/uri-list) <<< /crossvalidation/ <<< /crossvalidation/crossvalidation_id_i <<< /crossvalidation/crossvalidation_id_j get crossvalidation ------------------------------------------------------------------- >>> curl /crossvalidation/ supported accept-headers: "text/x-yaml" and "application/rdf-xml" validate an algorithm on a dataset via crossvalidation (may take a couple of minutes) ------------------------------------------------------------------- >>> curl -X POST -d algorithm_uri="" \ -d dataset_uri="" \ -d prediction_feature="" \ -d algorithm_params="" \ -d num_folds=5 \ -d random_seed=2 \ -d stratified=false \ /crossvalidation optional params: algorithm_params, default is empty num_folds, default is 10 random_seed, default is 1 stratified, default is false result example (accept-header: application/rdf-xml) <<< not yet supported result example (accept-header: text/uri-list) <<< /crossvalidation/id_i API-Examples Reports =================================================================== get list of available report types ------------------------------------------------------------------- >>> curl /report result example (accept-header: application/rdf-xml) <<< not yet supported result example (accept-header: text/uri-list) <<< /report/validation <<< /report/crossvalidation <<< /report/algorithm_comparison get list of available reports of type validation ------------------------------------------------------------------- >>> curl /report/validation result example (accept-header: application/rdf-xml) <<< not yet supported result example (accept-header: text/uri-list) <<< /report/validation/ <<< /report/validation/id_i <<< /report/validation/id_j get validation report ------------------------------------------------------------------- >>> curl /report/validation/ Supported formats (accept-headers): * "text/xml" content of report in docbook-article format * "text/html" report formated with default docbook-article-xsl * "text/x-yaml" returns report object with meta-info (without the actual report content) * "application/rdf+xml" returns report object with meta-info (without the actual report content) Hint: Visit /report/validation/ with a browser to see the report in html format create validation report from validation ------------------------------------------------------------------- >>> curl -X POST -d validation_uris="/" \ /report/validation result example (accept-header: application/rdf-xml) <<< not yet supported result example (accept-header: text/uri-list) <<< /report/validation/id_i get list of available reports of type crossvalidation ------------------------------------------------------------------- >>> curl /report/crossvalidation result example (accept-header: application/rdf-xml) <<< not yet supported result example (accept-header: text/uri-list) <<< /report/crossvalidation/ <<< /report/crossvalidation/id_i <<< /report/crossvalidation/id_j get crossvalidation report ------------------------------------------------------------------- >>> curl /report/crossvalidation/ Supported formats (accept-headers): * "text/xml" content of report in docbook-article format * "text/html" report formated with default docbook-article-xsl * "text/x-yaml" returns report object with meta-info (without the actual report content) * "application/rdf+xml" returns report object with meta-info (without the actual report content) Hint: Visit /report/crossvalidation/ with a browser to see the report in html format create crossvalidation report from crossvalidation ------------------------------------------------------------------- >>> curl -X POST -d validation_uris="/crossvalidation/" \ /report/crossvalidation result example (accept-header: application/rdf-xml) <<< not yet supported result example (accept-header: text/uri-list) <<< /report/crossvalidation/id_i manually format html report ------------------------------------------------------------------- >>> curl -X POST -d css_style_sheet= \ /report/crossvalidation//format_html This explicity invokes the report convertion to html, with css-style-sheet as parameter. result example (accept-header: application/rdf-xml) <<< not yet supported result example (accept-header: text/uri-list) <<< /report/crossvalidation/id_i