Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

hudspero/BigML-CPlusPlus-Bindings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#BigML-CPlusPlus-Bindings C++ Bindings for BigML Machine Learning API

created by Robert L. Hudspeth

Created to be used with the BigML Machine Learning API

Requirements

*) libcURL

*) cJSON

*) GCC 4.2.1+

#How does it work?

1) Get the required tools

2) Download the files in this repo in the same directory as your main file

3) Include "BigML.hpp"

4) Create object of BigML class

5) Set user authentication

6) Declare the functions you want to use

7) When compiling, BE SURE TO INCLUDE THE -lcurl FLAG! WITHOUT THIS, IT WILL NOT COMPILE!

What Is Happening?

To set user authentication, you have two choices.

-The first gets the username and API key from environment variables

  object.set_user_info(); 

-The second choice gets the username and API key from string literals

  object.set_user_info("username", "api_key");

If your username or API key are invalid, you will receive a 401 Error. If you don't have enough credits, you will receive a 402 Error. More info on bad status codes can be found here.

When a function is declared, a JSON body will be constructed, containing your user authentication and the information passed into the function arguments. For example, to create a remote source, you would call the function

object.create_remote_source("s3://bigml-public/csv/iris.csv", "source");

where the URL is a link to a remote source, and "source" is the name.

Once the JSON body is constructed, it will be sent in an HTTP POST request via libcURL, where it will be processed by the BigML API, and a resource will be created. Everything you submit to the API is viewable on the BigML Dashboard.

In return, you will get a unique resource identifier, which you can use to view on the BigML dashboard, or create a new resource of your choice.

NOTE: To create a resource, you cannot use any random identifier. To learn more, visit here.

To check on the status of the source for its completion, calling the function

object.get_source(object.get_src());

will send an HTTP GET request based on the resource identifier stored in

object.get_src();

Alternatively, you could call the function as

object.get_source("identifier");

The majority of functions follow a similar pattern, building off an existing resource's identifier. To create a dataset, for example, after creating a source, all you have to call is

object.create_dataset(object.get_src());

The only function that behaves differently is

object.create_prediction("model_identifier", "column", number);

where the prediction is created instantaneously and a confidence for that particular prediction is returned.

Any questions about these Bindings can be sent directly towards me. Anything else is better sent towards BigML.

What Can You Do?

As of 9/10/15, the current list of features are:

-Create a Remote Source

-Build a Dataset

-Detect a Anomalies

-Build a Cluster

-Build an Ensemble

-Build a Model

-Develop a Prediction

Last README Update: 04/07/2017

About

C++ Bindings for BigML Machine Learning API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published