My favorites | Sign in
Project Home Downloads Issues Source
Project Information
Members
Featured
Downloads
Links

Requirements

  • Training data on Google Storage
  • the gdata and activesupport Gems

Install

> sudo gem install google_prediction-0.0.1.gem
Successfully installed google_prediction-0.0.1
1 gem installed

Use

require 'google_prediction'
classifier = GooglePrediction::Classifier.new('your_account@gmail.com', 'password', 'bucket', 'training.csv')
classifier.train! #=> {"data"=>{"data"=>"bucket/training.csv"}}
classifier.check #=> {"data"=>{"data"=>"bucket/training.csv", "modelinfo"=>"Training has not completed."}}
classifier.check #=> {"data"=>{"data"=>"bucket/training.csv", "modelinfo"=>"estimated accuracy: 0.88"}}
classifier.predict('La idioma mas fina') #=> 'spanish'
Powered by Google Project Hosting