Classification and Regression with the BigML Dashboard

5.7 Consuming Deepnet

Similarly to other models in BigML, deepnets are white-boxed models, so you can download them and used them locally to make predictions. You can also create and consume your deepnet programmatically via the BigML API and bindings. The following subsections explain those three options.

5.7.1 Downloading Deepnet

You can download your deepnet in several programming languages including Python or Node.js. By downloading your deepnet you will be able to compute predictions locally, free of latency and at no cost. Click on the download icon in the top menu (see Figure 5.102 ), and select your preferred option (see Figure 5.103 .)

\includegraphics[]{images/deepnet/deepnet-download0}
Figure 5.102 Click download icon
\includegraphics[]{images/deepnet/deepnet-download}
Figure 5.103 Select language to download deepnet

5.7.2 Using Deepnets via the BigML API

Deepnets have full citizenship in the BigML API which allows you to programmatically create, configure, retrieve, list, update, delete, and use them for predictions.

In the below example, see how to create a deepnet using an existing dataset once you have properly set the BIGML_AUTH environment variable to contain your authentication credentials:

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

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

5.7.3 Using Deepnets via the BigML Bindings

You can also create and use deepnets via BigML bindings which are libraries aimed to make it easier to use the BigML API from your language of choice. BigML offers bindings in multiple languages including Python, Node.js, Java, Swift and Objective-C. See below an example to create a deepnet with the Python bindings.

from bigml.api import BigML
api = BigML()
deepnets = api.create_deepnet(
    'dataset/57506c472275c1666b004b10', {"objective_field":"churn"})

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