Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning Jupyter 5

You're reading from   Learning Jupyter 5 Explore interactive computing using Python, Java, JavaScript, R, Julia, and JupyterLab

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher
ISBN-13 9781789137408
Length 282 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (18) Chapters Close

Title Page
Packt Upsell
Contributors
Preface
1. Introduction to Jupyter FREE CHAPTER 2. Jupyter Python Scripting 3. Jupyter R Scripting 4. Jupyter Julia Scripting 5. Jupyter Java Coding 6. Jupyter JavaScript Coding 7. Jupyter Scala 8. Jupyter and Big Data 9. Interactive Widgets 10. Sharing and Converting Jupyter Notebooks 11. Multiuser Jupyter Notebooks 12. What's Next? 1. Other Books You May Enjoy Index

R machine learning


In this section, we will use an approach for machine learning where we will do the following:

  • Partition the dataset into a training and testing set
  • Generate a model of the data
  • Test the efficiency of our model

 

Dataset

Machine learning works by featuring a dataset that we will break up into a training section and a testing section. We will use the training data to come up with a model. We can then prove or test that model against the testing dataset.

For a dataset to be usable, we need at least a few hundred observations. I am using the housing data from http://uci.edu. Let's load the dataset by using the following command:

housing <- read.table("http://archive.ics.uci.edu/ml/machine-learning-databases/housing/housing.data") 

The site documents the names of the variables as follows:

Variables

Description

CRIM

Per capita crime rate

ZN

Residential zone rate percentage

INDUS

Proportion of non-retail business in town

CHAS

Proximity to Charles River (Boolean)

NOX

Nitric oxide concentration

RM...

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
Visually different images