Database Reference
In-Depth Information
> table(predictions, categories[,1],
dnn=list('predicted','actual'))
actual
predicted comedy history tragedy
comedy 15 0 0
history 0 12 0
tragedy 0 0 11
We can see here that the classifier predicted correctly for all Shakespeare
plays you gave it. You might notice that we're cheating here a little bit—we're
predicting over the same data that was used for training. In practice, you'd
want to keep a holdout set from the training data or perform
cross-validation, but that is beyond the scope of this example.
Finding Out More Information
CRAN is generally the first place you should look to find out more about
anything
in
R.
The
bigrquery
package
on
CRAN
at
http://cran.us.r-project.org/web/packages/bigrquery/
index.html has documentation of the available commands and how to use
them. This will likely be more up to date than this topic, so be sure to check it
out.
The version of bigrquery on CRAN may not be the most recent, however.
Bigrquery is currently under active development; the Open Source project
for bigrquery is on github at https://github.com/hadley/
bigrquery . If you'd like to read the source code to see how bigrquery
works (or even submit a patch to add new functionality), you can check
out the github bigrquery project. There is nothing mysterious or magical;
the most interesting parts may be the OAuth2 authentication and the job
management code. This code is all open source, licensed as GPL v3, so you
can copy it and make changes and extensions to it as you want.
Hadley Wickham, the creator of the bigrquery package, also has a more
ambitious project called dplyr that can use BigQuery (among other back
ends). Dplyr simplifies applying operations to local or remote tabular data.
If you're interested in using BigQuery on R, you might also be interested
in
checking
it
out—it
is
available
on
CRAN
at
http://cran.us.r-project.org/web/packages/dplyr/
index.html .
Search WWH ::




Custom Search