A project to demonstrate how to use google-api-php-client and google-cloud-php libraries for prediction.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
census Initial commit May 30, 2017
jobs Update get.php May 30, 2017
README.md Update README.md May 30, 2017
composer.json Initial commit May 30, 2017
composer.lock Initial commit May 30, 2017
deploy.php Added deploy.php May 30, 2017
phpunit.xml.dist Initial commit May 30, 2017
predict.php Initial commit May 30, 2017
storage.php Initial commit May 30, 2017

README.md

Demonstrate how to use Google Machine Learning Engine with php library.

In this work I will be illustrating Predicting Income with the Census Income Dataset from google ml-engine docs with Google PHP apis. We will be using it code from Google Cloud's Github repository.

Following are the steps in using machine learning engine for prediction.

  1. Create a service account and download the credential json file.
  2. Package and upload the code to Google cloud.
  3. Composer install libraries.
  4. Upload training and testing data to Google Cloud Storage using storage.php
  5. Train the model using jobs/create.php. This will set a job to train the model. We can use jobs/list.php to list all the jobs in our project and jobs/get.php to get a job details by name.
  6. Deploy the model using deploy.php
  7. Predict using predict.php