Book Image

Neural Networks with R

By : Balaji Venkateswaran, Giuseppe Ciaburro
Book Image

Neural Networks with R

By: Balaji Venkateswaran, Giuseppe Ciaburro

Overview of this book

Neural networks are one of the most fascinating machine learning models for solving complex computational problems efficiently. Neural networks are used to solve wide range of problems in different areas of AI and machine learning. This book explains the niche aspects of neural networking and provides you with foundation to get started with advanced topics. The book begins with neural network design using the neural net package, then you’ll build a solid foundation knowledge of how a neural network learns from data, and the principles behind it. This book covers various types of neural network including recurrent neural networks and convoluted neural networks. You will not only learn how to train neural networks, but will also explore generalization of these networks. Later we will delve into combining different neural network models and work with the real-world use cases. By the end of this book, you will learn to implement neural network models in your applications with the help of practical examples in the book.
Table of Contents (14 chapters)
Title Page
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

The rnn package in R


To implement RNN in an R environment, we can use the rnn package available through CRAN. This package is widely used to implement an RNN. A brief description of the rnn package, extracted from the official documentation, is shown in the following table:

rnn: Recurrent Neural Network

Description:

Implementation of an RNN in R

Details:

Package: rnn Type: Package Version: 0.8.0 Date: 2016-09-11 License: GPL-3

Authors:

Bastiaan Quast Dimitri Fichou

The main functions used from the rnn package are shown in this table:

predict_rnn

Predicts the output of an RNN model:

predict_rnn(model, X, hidden = FALSE, real_output = T, ...)

run.rnn_demo

A function to launch the rnn_demo app​:

run.rnn_demo(port = NULL)

trainr

This trains the RNN. The model is used by the predictr function.

predictr

This predicts the output of an RNN model:

predictr(model, X, hidden = FALSE, real_output = T, ...)

 

 

As always, to be able to use a library, we must first install and then load it into our script.

Note

Remember, to...