Blogs Blogs

«Back

OpenTox Model superbuilder

A Super Algorithm is a specific instance of an OpenTox algorithm service, that uses other OpenTox services to create a model or a dataset.

The model superbuilder  is an initial (and simplified) implementation of a superservice for creating predictive models, as described in OpenTox API 1.2 . Such a super algorithm uses descriptor calculation service, feature selection service and a modelling algorithm service to create prediction models. In general,  OpenTox Model services execute only learning algorithms (e.g. regression or classification) and assume the input dataset contains all necessary descriptors.

The superbuilder accepts URI of descriptor calculation algorithms via "feature_calculation" parameters, runs all the calculation, prepares a dataset with all descriptors and the endpoint (URI specified by "prediction_feature" parameter), and submits the final dataset to the learning algorithm (URI specified by "model_learning" parameter).

curl -X POST http://apps.ideaconsult.net:8080/ambit2/algorithm/superbuilder \

-d "dataset_uri=http://apps.ideaconsult.net:8080/ambit2/dataset/12" \

-d "prediction_feature=http://apps.ideaconsult.net:8080/ambit2/feature/21686" \

-d "model_learning=http://apps.ideaconsult.net:8080/ambit2/algorithm/J48" \

-d "feature_calculation=http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.XLogPDescriptor" \

-d "feature_calculation=http://apps.ideaconsult.net:8080/ambit2/algorithm/ambit2.descriptors.MolecularWeight" \

-d "feature_calculation=http://apps.ideaconsult.net:8080/ambit2/algorithm/org.openscience.cdk.qsar.descriptors.molecular.RotatableBondsCountDescriptor" -iv

The model details can be inspected via

curl -H "Accept:text/n3" http://apps.ideaconsult.net:8080/ambit2/model/157717

The model can be  applied directly to a dataset, provided it has all descriptors calculated

curl -X POST -d "dataset_uri=http://apps.ideaconsult.net:8080/ambit2/dataset/R710838" http://apps.ideaconsult.net:8080/ambit2/model/157717

Or via the superservice for applying models :

curl -X POST -d "dataset_uri=http://apps.ideaconsult.net:8080/ambit2/dataset/<any>" \

-d "model_uri=http://apps.ideaconsult.net:8080/ambit2/model/157717" \

http://apps.ideaconsult.net:8080/ambit2/algorithm/superservice

This will return (intermediate) task URI and finally a dataset URI , containing the predictions, as specified in OpenTox API.

The model superbuilder does not support currently all defined parameters but only parameters, shown in the example above.

 

 

 

 

 

Comments