Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Jupyter for Data Science

You're reading from  Jupyter for Data Science

Product type Book
Published in Oct 2017
Publisher Packt
ISBN-13 9781785880070
Pages 242 pages
Edition 1st Edition
Languages
Author (1):
Dan Toomey Dan Toomey
Profile icon Dan Toomey

Table of Contents (17) Chapters

Title Page
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
1. Jupyter and Data Science 2. Working with Analytical Data on Jupyter 3. Data Visualization and Prediction 4. Data Mining and SQL Queries 5. R with Jupyter 6. Data Wrangling 7. Jupyter Dashboards 8. Statistical Modeling 9. Machine Learning Using Jupyter 10. Optimizing Jupyter Notebooks

Neural networks


We can model the housing data as a neural network where the different data elements are inputs into the system and the output of the network is the house price. With a neural net we end up with a graphical model that provides the factors to apply to each input in order to arrive at our housing price.

Neural networks in R

There is a neural network package available in R. We load that in:

#install.packages('neuralnet', repos="http://cran.r-project.org") 
library("neuralnet")

Load in the housing data:

filename = "http://archive.ics.uci.edu/ml/machine-learning-databases/housing/housing.data" 
housing <- read.table(filename) 
colnames(housing) <- c("CRIM", "ZN", "INDUS", "CHAS", "NOX",  
                       "RM", "AGE", "DIS", "RAD", "TAX", "PRATIO", 
                       "B", "LSTAT", "MDEV")

Split up the housing data into training and test sets (we have seen this coding in prior examples):

housing <- housing[order(housing$MDEV),] 
#install.packages("caret") 
library(caret...
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 $15.99/month. Cancel anytime}