2017 © Pedro Peláez
 

library bigml-php-sdk

BigML php SDK

image

necromant2005/bigml-php-sdk

BigML php SDK

  • Monday, November 3, 2014
  • by necromant2005
  • Repository
  • 2 Watchers
  • 5 Stars
  • 17,532 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 15 Versions
  • 0 % Grown

The README.md

bigml-php-sdk

Build Status, (*1)

Introduction

BigML PHP SDK for bigml.com api access, (*2)

Features / Goals

  • Simple API access from php
  • Cover data transfromation json => array , array=>json and error handling
  • Implemntation resources: source, dataset, model, prediction, evaluation

Installation

Main Setup

With composer

  1. Add this to your composer.json:
"require": {
    "necromant2005/bigml-php-sdk": "1.*",
}
  1. Now tell composer to download BigMl PHP SDK by running the command:
$ php composer.phar update

Usage

Creating source resource with API version "andromeda", (*3)

use BigMl\Client\BigMl;

$source = BigMl::factory('source', array(
    'username' => 'alfred',
    'api_key'  => '79138a622755a2383660347f895444b1eb927730',
));

Creating source resource in develoment mode with specific api version, (*4)

use BigMl\Client\BigMl;

$source = BigMl::factory('source', array(
    'username' => 'alfred',
    'api_key'  => '79138a622755a2383660347f895444b1eb927730',
    'access_point' => 'https://bigml.io/dev/',
    'version' => 'andromeda',
));

Using custom prediction Access Point for dedidated BigML AWS prediction instance, (*5)

use BigMl\Client\BigMl;

$source = BigMl::factory('source', array(
    'username' => 'alfred',
    'api_key'  => '79138a622755a2383660347f895444b1eb927730',
    'access_point' => 'https://bigml.io/dev/',
    'access_point_prediction' => 'https://prediction.dev.bigml.io/',
    'version' => 'andromeda',
));

Usage Basic

Creating resource through factory, (*6)

use BigMl\Client\BigMl;

BigMl::factory('source', array( ... )); // source
BigMl::factory('dataset', array( ... )); // dataset
BigMl::factory('model', array( ... )); // model
BigMl::factory('prediction', array( ... )); // prediction
BigMl::factory('evaluation', array( ... )); // evaluation

Usage Source

Create source data, (*7)

use BigMl\Client\BigMl;

$source = BigMl::factory('source', array( ... ));
$source->create(array('data' => array(
    'a', 'b', 'c',
    1, 2, 3,
    4, 5, 7
)));

Create source remote, (*8)

use BigMl\Client\BigMl;

$source = BigMl::factory('source', array( ... ));
$source->create(array('remote' => 's3://bigml-public/csv/iris.csv'));

Get info about source, (*9)

use BigMl\Client\BigMl;

$source = BigMl::factory('source', array( ... ));
$source->retrieve('source/4f510d2003ce895676000069');

Get info with waiting til the process is finished and checking status every 10 seconds, (*10)

use BigMl\Client\BigMl;

$source = BigMl::factory('source', array( ... ));
$source->wait('source/4f510d2003ce895676000069', 10);

Find source with name 'iris', (*11)

use BigMl\Client\BigMl;

$source = BigMl::factory('source', array( ... ));
$source->retrieve('source', array(
    'name' => 'iris'
));

Rename source, (*12)

use BigMl\Client\BigMl;

$source = BigMl::factory('source', array( ... ));
$source->update('source/4f510d2003ce895676000069', array(
    'name' => 'iris-new'
));

Remove sorce, (*13)

use BigMl\Client\BigMl;

$source = BigMl::factory('source', array( ... ));
$source->delete('source/4f510d2003ce895676000069');

Usage Prediction

Make prediction, (*14)

use BigMl\Client\BigMl;

$service = BigMl::factory('prediction', array( ... ));
$service->create(array(
    'model' => 'model/57510d2003ce895676000069',
    'input_data' => array(
        '000000' => 'value1',
        '000001' => 'valu2',
    ),
    'name' => 'my-prediction',
));

The Versions

03/11 2014

dev-master

9999999-dev https://github.com/necromant2005/bigml-php-sdk

BigML php SDK

  Sources   Download

MIT

The Requires

 

sdk bigml

03/11 2014

1.5.1

1.5.1.0 https://github.com/necromant2005/bigml-php-sdk

BigML php SDK

  Sources   Download

MIT

The Requires

 

sdk bigml

03/11 2014

1.5.0

1.5.0.0 https://github.com/necromant2005/bigml-php-sdk

BigML php SDK

  Sources   Download

MIT

The Requires

 

sdk bigml