Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
R Machine Learning Projects

You're reading from  R Machine Learning Projects

Product type Book
Published in Jan 2019
Publisher Packt
ISBN-13 9781789807943
Pages 334 pages
Edition 1st Edition
Languages
Author (1):
Dr. Sunil Kumar Chinnamgari Dr. Sunil Kumar Chinnamgari
Profile icon Dr. Sunil Kumar Chinnamgari

Table of Contents (12) Chapters

Preface 1. Exploring the Machine Learning Landscape 2. Predicting Employee Attrition Using Ensemble Models 3. Implementing a Jokes Recommendation Engine 4. Sentiment Analysis of Amazon Reviews with NLP 5. Customer Segmentation Using Wholesale Data 6. Image Recognition Using Deep Neural Networks 7. Credit Card Fraud Detection Using Autoencoders 8. Automatic Prose Generation with Recurrent Neural Networks 9. Winning the Casino Slot Machines with Reinforcement Learning 10. The Road Ahead
11. Other Books You May Enjoy

Building a text sentiment classifier with fastText

fastText is a library and is an extension of word2vec for word representation. It was created by the Facebook Research Team in 2016. While Word2vec and GloVe approaches treat words as the smallest unit to train on, fastText breaks words into several n-grams, that is, subwords. For example, the trigrams for the word apple are app, ppl, and ple. The word embedding for the word apple is sum of all the word n-grams. Due to the nature of the algorithm's embedding generation, fastText is more resource-intensive and takes additional time to train. Some of the advantages of fastText are as follows:

  • It generates better word embeddings for rare words (including misspelled words).
  • For out of vocabulary words, fastText can construct the vector for a word from its character n-grams, even if a word doesn't appear in training corpus...
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}