On May 21st and 22nd, I had the honor of having been chosen to attend the rOpenSci unconference 2018 in Seattle. It was a great event and I got to meet many amazing people!
rOpenSci
rOpenSci is a non-profit organisation that maintains a number of widely used R packages and is very active in promoting a community spirit around the R-world. Their core values are to have open and reproducible research, shared data and easy-to-use tools and to make all this accessible to a large number of people.
rOpenSci unconference
Part of creating a welcoming community infrastructure is their yearly unconference. At the unconference, about 60 invited R users from around the world get together to work on small projects that are relevant to the R community at the time. Project ideas are collected and discussed in Github issues during the weeks before the unconference but the final decision which projects will be worked on is made by the participants on the first morning of the unconference.
This year’s rOpenSci unconference was held at the Microsoft Reactor in Seattle.
The whole organizing team - most and foremost Stefanie Butland - did a wonderful job hosting this event. Everybody made sure that the spirit of the unconference was inclusive and very welcoming to everybody, from long-established fixtures in the R-world to newbies and anyone in between.
We were a pretty diverse group of social scientists, bioinformaticians, ecologists, historians, data scientists, developers, people working with Google, Microsoft or RStudio and R enthusiasts from many other fields. Some people already knew a few others, many knew each other from Twitter, R-Ladies, or other online communities but most of us (including me) had never met in person.
Therefore, the official part of the unconference was started on Monday morning with a few “ice breakers”: Stefanie would ask a question or make a statement and we would position ourselves in the room according to our answer and discuss with the people close to us. Starting with “Are you a dog or a cat person?” and finishing with “I know my place in the R community”, we all quickly had a lot to talk about! It was a great way to meet many of the people we would spend the next two days with.
It was a great experience working with so many talented and motivated people who share my passion for the R language - particularly because in my line of work as a data scientist R is often considered inferior to Python and the majority of the active R community is situated in the Pacific Northwest and California. It was a whole new experience to work together with other people on an R project and I absolutely loved it!
Working on greta
During the 2 days of the unconference, people worked on many interesting, useful and cool projects (click here for a complete list with links to the Github repos for every project!)!
The group I joined originally wanted to bring TensorFlow Probability to R.
TensorFlow Probability is a library for probabilistic reasoning and statistical analysis in TensorFlow. As part of the TensorFlow ecosystem, TensorFlow Probability provides integration of probabilistic methods with deep networks, gradient-based inference via automatic differentiation, and scalability to large datasets and models via hardware acceleration (e.g., GPUs) and distributed computation. https://github.com/tensorflow/probability
In the end, we - that is Michael Quinn, David Smith, Tiphaine Martin, Matt Mulvahill and I - ended up working with the R package greta, which has similar functionalities as TensorFlow Probability. We recreated some of the examples from the TensorFlow Probability package tutorials in greta and we also added a few additional examples that show how you can use greta.
Check out the README repo for an overview and links to everything we’ve contributed; it is a forked repo from the original package repo of greta and the vignettes will hopefully get included in the main repo at some point in the near future.
What is greta?
greta is an R package that has been created by Nick Golding for implementing Markov-Chain Monte-Carlo (MCMC) models, e.g. a Hamiltonian Monte Carlo (HMC) method. It offers a number of functions that make it easy to define these models, particularly for Bayesian statistics (similar to Stan).
greta lets us build statistical models interactively in R, and then sample from them by MCMC. https://greta-dev.github.io/greta/get_started.html#how_greta_works
Google’s TensorFlow is used as a backend to compute the defined models. Because TensorFlow has been optimized for large-scale computing, multi-core and GPU calculations are supported as well, greta is particularly efficient and useful for working with complex models. As TensorFlow is not natively an R package, greta makes use of RStudio’s reticulate and tensorflow packages to connect with the TensorFlow backend. This way, we can work with all the TensorFlow functions directly from within R.
How does greta work?
There are three layers to how greta defines a model: users manipulate greta arrays, these define nodes, and nodes then define Tensors. https://greta-dev.github.io/greta/technical_details.html
This is the minimum working example of the linear mixed model that we developed in greta based on an example from a TensorFlow Probability Jupyter notebook. The full example with explanations can be found here.
library(greta)
# data
N