|R Gets Notebooks & TensorFlow|
|Tuesday, 11 October 2016|
It seems that most languages need a notebook format and now R has its very own and a new connection to TensorFlow. What more could an up and coming language require to be fully modern?
Given that R is used at lot of the time, perhaps all of the time, for off-the-cuff, scratchpad-style, statistical analysis, what could be more fitting than using it via a notebook style IDE.
If you have missed the idea of the notebook, it allows the free mixing of code, its output and annotation. You can create a notebook page that looks like a presentation or a lesson and this is the main use of the idea. Notebooks are familiar if you use Mathematica or Maple. Then there is the iPython notebook, recently developed into Jupyter, which supports Python and a number of other languages including R.
R Notebooks, however, have some advantages over Jupyter. In particular they integrate with R Studio which is a common IDE for R. You can view a Notebook in R Studio In addition R Notebooks feature batch execution reather than interactively a cell at a time. The Notebook format uses R Markdown and can display almost any output that R produces including console output, plots, data frames and HTML widgets. In addition you can run code written in other languages including Python, Bash, SQL or C++.
You can see R Notebooks in action in the following video:
TensorFlow is Google's general purpose number crunching system using data flow graphs that makes implementening neural networks easier. R already has some packages that do neural networks but, if you have tried them out you will discover that they are fine as far as they go but they have an "unfinished" feel to them and there is no general purpose R neural network package. This leaves R a bit behind the times as far as neural network machine learning is concerned.
Now we have TensorFlow for R, an open source library that allows R to make use of TensorFlow via its Python bindings. TensorFlow itself is written in C/C++ and to use it via Python via R is a little bit indirect, but this shouldn't really impact performance as once the flowgraphs are constructed TensorFlow gets on with the calculation irrespective of what was used to set things up.
The advantage of using TensorFlow from R is that you can use R to clean up the data and generally explore it before trying out complicated neural networks on it. If you are familiar with R you will still have to learn how to setup a data flowgraph for TensorFlow to do your calculation, but at least you will know how to manipulate the data.
To make use of it you need to install TensorFlow and the R package. You also almost certainly want to install RStudio because this has code completion and online help for TensorFlow.
or email your comment to: email@example.com
|Last Updated ( Tuesday, 11 October 2016 )|