Quantitative finance collector
C++ Matlab VBA/Excel Java Mathematica R/Splus Net Code Site Other
Dec 16

Issues of R Client Library For The Google Prediction API

Posted by abiao at 22:30 | Code » R/Splus | Comments(2) | Reads(15192)
The Google Prediction API is a black-box system for building predictive models, it provides pattern-matching and machine learning capabilities. So Google algorithms automatically creates a model from the training models given a set of training data and makes prediction under this model given a set of explanatory variables, read http://code.google.com/apis/predict/docs/getting-started.html for an overview.

I am eager to make my hands dirty after the release of R client library for the Google Prediction API @ http://code.google.com/p/google-prediction-api-r-client/, however, as both my office's computer and my laptop are under Windows, there are few issues for the R API package:
1, the original usage example had mistake. I always had a problem when I wanted to train my local data, my.model <- PredictionApiTrain(data="MYPATH/MYFILE.csv"), it says
Error in PredictionApiTrain(data = "test.csv") : 'remote.file' should be character.
At the beginning of PredictionApiTrain() there are lines:
if (missing(remote.file) || !is.character(remote.file))
stop("'remote.file' should be character")

However, remote.file is an argument without default value, function (data, remote.file, verbose = FALSE). Now the example has been changed to my.model <- PredictionApiTrain (data="MYPATH/MYFILE.csv",remote.file="gs://MYBUCKET/MYOBJECT");

2, even when I use PredictionApiTrain
trained model my.model is expected, however, R returns
Error in system(command = command, intern = TRUE) : gsutil not found
I did install gsutil as described at http://code.google.com/apis/storage/docs/gsutil.html, and can list my bucket using: python gsutil ls gs://MYBUCKET/MYOBJECT.
The comment I got this afternoon is:
We recommend to run this R client under Linux since this version doesn't support gsutil under Windows using Python.
CygWin is a more recommended environment for running gsutil under Windows. And we will add this feature in future release soon.

It seems we have to wait for a while before testing this promising application, luckily the ball is moving forward. Please share with us if you find a way out. I am looking forward to it and will update once I successfully try CygWin.

Tags: ,
While you are installing the Cygwin version of gsutil, you can upload the training CSV file using the Python version of gsutil, say,> python gsutil cp myfile.csv gs://MYBUCKET/MYOBJECTand you can invoke the Prediction API in R> my.model <- PredictionApiTrain (data="gs://MYBUCKET/MYOBJECT")
samuelddarden Email
I have the same problem. How is the progress and when will this be fixed?   pubg game
Pages: 1/1 First page 1 Final page
Add a comment
Enable HTML
Enable UBB
Enable Emots
Nickname   Password   Optional
Site URI   Email   [Register]