apiko-dev / meteor-google-prediction

Google Prediction API v1.6 Meteor client

Home Page:https://atmospherejs.com/jss/meteor-google-prediction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Google Prediction API Client

Google Prediction API v1.6 client for Meteor.

Quick example

//initialize client
var authOptions = {
  serviceEmail: CloudSettings.SERVICE_EMAIL,
  pemFile: CloudSettings.PEM_FILE, //PEM file name located in `/private` directory
  projectName: 'MyProjectName' //name of your project in google developer console
};
var googlePrediction = new GooglePrediction(authOptions); //create new client instance


//training new model
var insertResult = googlePrediction.insert("MyModel","GoogleCloudStorageBucketName","training-data-file.csv");


//check model status
var modelStatus = googlePrediction.get("MyModel");


//list available models
var models = googlePrediction.list();


//make prediction
var inputData = [25,'foo',30,'bar'];
var result = googlePrediction.predict("MyModel", inputData);//access to prediction API
console.log('Predicted Value: ', result.outputValue);

Supported methods

  • analyze
  • delete
  • get
  • insert
  • list
  • predict
  • update

Also, see full API Reference

Getting PEM file

This package is built on top of google-oauth-jwt npm package. Here's detailed instruction how to generate .pem file.


Made by Custom Software Development Company - Custom Software Development Company

About

Google Prediction API v1.6 Meteor client

https://atmospherejs.com/jss/meteor-google-prediction

License:MIT License


Languages

Language:JavaScript 100.0%