Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Neural Networks with R

You're reading from   Neural Networks with R Build smart systems by implementing popular deep learning models in R

Arrow left icon
Product type Paperback
Published in Sep 2017
Publisher Packt
ISBN-13 9781788397872
Length 270 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Balaji Venkateswaran Balaji Venkateswaran
Author Profile Icon Balaji Venkateswaran
Balaji Venkateswaran
Giuseppe Ciaburro Giuseppe Ciaburro
Author Profile Icon Giuseppe Ciaburro
Giuseppe Ciaburro
Arrow right icon
View More author details
Toc

Table of Contents (8) Chapters Close

Preface 1. Neural Network and Artificial Intelligence Concepts FREE CHAPTER 2. Learning Process in Neural Networks 3. Deep Learning Using Multilayer Neural Networks 4. Perceptron Neural Network Modeling – Basic Models 5. Training and Visualizing a Neural Network in R 6. Recurrent and Convolutional Neural Networks 7. Use Cases of Neural Networks – Advanced Topics

LSTM using the iris dataset


Continuing with the LSTM architecture for RNN introduced in Chapter 6, Recurrent and Convolutional Neural Networks, we present the iris dataset processing using the mxnet LSTM function. The function expects all inputs and outputs as numeric. It is particularly useful for processing text sequences, but here we will train an LSTM model on the iris dataset. The input values are petal.length, petal.width, sepal.length, and sepal.width. The output variable is Species, which is converted to a numeric value between one and three. The iris dataset has been detailed in Chapter 4, Perceptron Neural Network Modeling – Basic Models:

#################################################################
### Chapter 7 - Neural Networks with R - Use cases      #########
### Prediction using LSTM on IRIS dataset               #########
#################################################################

##Required one time
library("mxnet")

data(iris)

x = iris[1:5!=5,-5]
y = as.integer...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime