Classification and Regression with the BigML Dashboard

7.7 Consuming Evaluations

BigML allows you to create and consume your evaluations programmatically via the BigML API and bindings. The following subsections explain both tools.

7.7.1 Using Evaluations via the BigML API

You can perform all the evaluation actions explained in this document via the BigML API such as creating, configuring, retrieving, listing, updating, and deleting evaluations.

See below how to create an evaluation just using a model and a testing dataset once you have properly set the BIGML_AUTH environment variable to contain your authentication credentials:

curl "https://bigml.io/evaluation?$BIGML_AUTH" \
    -X POST \
    -H 'content-type: application/json' \
    -d '{"dataset": "dataset/50650bdf3c19201b64000020",
         "model": "model/50650bea3c19201b64000024"}'

Apart from all the BigML Dashboard actions, you can also create an evaluation using multiple models and multiple datasets via the BigML API:

  • Provide multiple model IDs, and the models will be evaluated as an ensemble and you can select your preferred voting strategy option. (See subsection 7.4.2 .)

  • Provide a list of datasets identifiers, and the corresponding datasets will be concatenated and used as input. You can also sample the resulting dataset. (See subsection 7.4.4 .)

For more information on using evaluations through the BigML API, please refer to documentation.

7.7.2 Using Evaluations via the BigML Bindings

You can create and use evaluations via BigML bindings which are libraries aimed to make it easier to use the BigML API from your language of choice. BigML offers bindings for several languages including Python, Node.js, Java, Swift or Objective-C. You can find an example to create an evaluation with Python bindings below.

from bigml.api import BigML
api = BigML()
evaluation = api.create_evaluation('model/57506c472275c1666b004b10',
                                   'dataset/576d213d983efc63e8000038')

For more information on BigML bindings, please refer to the bindings page.