Getting Started with Deep Learning in R

WhatsApp Group Join Now
Telegram Group Join Now
Instagram Group Join Now

There are good reasons for deep learning: deep learning has for some time outperformed the corresponding “classical” techniques in areas such as image recognition and natural language processing, and it has the potential to bring interesting insights even to tabular analysis. . For many R users interested in data deep learning, the obstacle is not the mathematical prerequisites (as many with a background in statistical or empirical sciences), but how to get started in an efficient way. .

This post will provide an overview of some of the materials that may be useful. In case you don't have a background in statistics or similar, we'll also offer some helpful resources for getting to know “math”.

Keras Tutorials

The easiest way to get started is to use the Keras API. It is a high-level, declarative (in a sense) way to define, train, and test a model, which was originally developed. The python By Francois Cholet and ported to R by JJ Allaire.

See the lesson on Keras website: They introduce basic tasks such as classification and regression, as well as basic workflow elements such as saving and restoring a model, or evaluating model performance.

  • Basic classification starts you classifying the image using . Fashion MNIST The dataset

  • Classification of text Shows how to perform sentiment analysis on movie reviews, and includes the important topic of how to pre-process text for deep learning.

  • Basic regression demonstrates the task of predicting a continuous variable through the example of the famous Boston housing dataset that ships with Keras.

  • Overfitting and underfitting Explains how you can assess whether your model is underfitting or overfitting, and what treatment to take.

  • Last but not least, Save and restore models. How to save checkpoints during and after training, so you don't lose the fruits of your network's labor.

Once you've covered the basics, the website has more advanced information on implementing custom logic, monitoring and tuning, as well as using and adapting pre-trained models.

Videos and books

If you want a little more imaginative background, Deep learning with R in motion The video series provides a good introduction to the basic concepts of machine learning and deep learning, including things that are often taken for granted, such as derivatives and gradients.

Example of Deep Learning with R-in-Motion, Video 2.7, From Derivatives to Gradients

The first 2 components of the video series (getting started And MNIST Case Study) are independent. The remaining videos introduce various neural network architectures through detailed case studies.

is a companion to the series. Deep learning with R Book by Francois Cholet and JJ Allier. Like the videos, the book has excellent, high-level explanations of deep learning concepts. At the same time, it contains lots of ready-to-use code, offering examples for all major architectures and use cases (including fancy stuff like variable autoencoders and GANs).

Inspiration

If you're not pursuing a specific goal, but are generally interested in what can be done with deep learning, a good place to follow is the TensorFlow for R Blog. There, you'll find deep learning for business as well as scientific work as well as technical demonstrations and introductions to new features.

Additionally, TensorFlow for R Gallery features several case studies that have proven particularly useful for getting started in various application areas.

Reality

Once the ideas are there, the feeling should follow, and for most of us the question will be: Where can I actually do it? The train That model? As real-world sized images are involved, or other types of high-dimensional data, you'll need a modern, high-performance GPU so training on your laptop is no longer an option.

There are a few different ways you can train in the cloud:

More background

If your background isn't very “methy”, you may find that you'll want to complement the concepts-focused approach. Deep learning with R with a little more low-level basics (like some people feel the need to know at least a little C or assembler when learning a high-level language).

Personal recommendations for such cases would include Andrew Ng. Deep learning skills on Coursera (videos are free to watch), and books and recorded lectures on linear algebra Gilbert Strong.

Indeed, the ultimate reference to deep learning, to date, is this. Deep learning Textbook by Ian Goodfellow, Yoshua Bengio and Aaron Corwell. The book covers everything from background in linear algebra, probability theory and basic architectures such as optimization through CNNs or RNNs to unsupervised models at the frontier of cutting-edge research.

Getting help

Finally, if you encounter problems with the software (or with mapping your work to executable code), a good idea is to create a GitHub issue in the relevant repository. , such as, rstudio/keras.

Best wishes on your deep learning journey with R!

WhatsApp Group Join Now
Telegram Group Join Now
Instagram Group Join Now

Leave a Comment