Rnn (software)

rnn
Original author(s) Bastiaan Quast
Initial release 30 November 2015 (2015-11-30)
Stable release
0.8.1 / 21 June 2018 (2018-06-21)
Written in R
Size 460.3 kB (v. 0.8.1)
License GPL v3
Website cran.r-project.org

rnn is an open-source machine learning framework that implements Recurrent Neural Network architectures, such as LSTM and GRU, natively in the R programming language.

The rnn package is distributed through the Comprehensive R Archive Network[1] under the open-source GPL v3 license.

Workflow

The below example from the rnn documentation show how to train a recurrent neural network to solve the problem of bit-by-bit binary addition.

> # install the rnn package, including the dependency sigmoid
> install.packages('rnn')

> # load the rnn package
> library(rnn)

> # create input data 
> X1 = sample(0:127, 10000, replace=TRUE)
> X2 = sample(0:127, 10000, replace=TRUE)

> # create output data
> Y <- X1 + X2

> # convert from decimal to binary notation 
> X1 <- int2bin(X1, length=8)
> X2 <- int2bin(X2, length=8)
> Y  <- int2bin(Y,  length=8)

> # move input data into single tensor
> X <- array( c(X1,X2), dim=c(dim(X1),2) )

> # train the model
> model <- trainr(Y=Y,
+                 X=X,
+                 learningrate   =  1,
+                 hidden_dim     = 16  )
Trained epoch: 1 - Learning rate: 1
Epoch error: 0.839787019539748

sigmoid

The sigmoid functions and derivatives used in the package were originally included in the package, from version 0.8.0 onwards, these were released in a separate R package sigmoid, with the intention to enable more general use. The sigmoid package is a dependency of the rnn package and therefore automatically installed with it.[2]

Reception

With the release of version 0.3.0 in April 2016[3] the use in production and research environments became more widespread. The package was reviewed several months later on the R blog The Beginner Programmer as "R provides a simple and very user friendly package named rnn for working with recurrent neural networks.",[4] which further increased usage.[5]

The book Neural Networks in R by Balaji Venkateswaran and Giuseppe Ciaburro uses rnn to demonstrate recurrent neural networks to R users.[6]

The RStudio CRAN mirror download logs [7] show that the package is downloaded on average about 1000 per month from those servers ,[8] with a total of over 20,000 downloads since the first release ,[9] according to RDocumentation.org, this puts the package in the 15th percentile of most popular R packages .[10]

References

  1. "CRAN - Package rnn".
  2. "CRAN - Package sigmoid".
  3. "bquast/rnn". GitHub. Retrieved 2018-07-05.
  4. Mic (2016-08-05). "The Beginner Programmer: Plain vanilla recurrent neural networks in R: waves prediction". The Beginner Programmer. Retrieved 2018-07-06.
  5. "LSTM or other RNN package for R". Data Science Stack Exchange. Retrieved 2018-07-05.
  6. "Neural Networks with R". Neural Networks with R. O'Reilly. September 2017. ISBN 9781788397872. Archived from the original on 2018-10-02. Retrieved 2018-10-02.
  7. "RStudio CRAN logs".
  8. "CRANlogs rnn package".
  9. "CRANlogs rnn package".
  10. "RDocumentation rnn".
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.