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
R Deep Learning Projects

You're reading from  R Deep Learning Projects

Product type Book
Published in Feb 2018
Publisher Packt
ISBN-13 9781788478403
Pages 258 pages
Edition 1st Edition
Languages

Dealing with a small training set – data augmentation


We have been very fortunate so far to possess a large-enough training dataset with 75% of 39,209 samples. This is one of the reasons why we are able to achieve a 99.3% to 99.4% classification accuracy. However, in reality, obtaining a large training set is not easy in most supervised learning cases, where manual work is necessary or the cost of data collection and labeling is high. In our traffic signs classification project, can we still achieve the same performance if we are given a lot less training samples to begin with? Let's give it a shot.

We simulate a small training set with only 10% of the 39,209 samples and a testing set with the rest 90%:

> train_perc_1 = 0.1 
> train_index_1 <- createDataPartition(data.y, p=train_perc_1, list=FALSE) 
> train_index_1 <- train_index_1[sample(nrow(train_index_1)),] 
> data_train_1.x <- data.x[train_index_1,] 
> data_train_1.y <- data.y[train_index_1] 
> data_test_1...
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}