Building Machine Learning Systems with Python
eBook - ePub

Building Machine Learning Systems with Python

Explore machine learning and deep learning techniques for building intelligent systems using scikit-learn and TensorFlow, 3rd Edition

Luis Pedro Coelho, Willi Richert, Matthieu Brucher

  1. 406 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Building Machine Learning Systems with Python

Explore machine learning and deep learning techniques for building intelligent systems using scikit-learn and TensorFlow, 3rd Edition

Luis Pedro Coelho, Willi Richert, Matthieu Brucher

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

Get more from your data by creating practical machine learning systems with Python

Key Features

  • Develop your own Python-based machine learning system
  • Discover how Python offers multiple algorithms for modern machine learning systems
  • Explore key Python machine learning libraries to implement in your projects

Book Description

Machine learning allows systems to learn things without being explicitly programmed to do so. Python is one of the most popular languages used to develop machine learning applications, which take advantage of its extensive library support. This third edition of Building Machine Learning Systems with Python addresses recent developments in the field by covering the most-used datasets and libraries to help you build practical machine learning systems.

Using machine learning to gain deeper insights from data is a key skill required by modern application developers and analysts alike. Python, being a dynamic language, allows for fast exploration and experimentation. This book shows you exactly how to find patterns in your raw data. You will start by brushing up on your Python machine learning knowledge and being introduced to libraries. You'll quickly get to grips with serious, real-world projects on datasets, using modeling and creating recommendation systems. With Building Machine Learning Systems with Python, you'll gain the tools and understanding required to build your own systems, all tailored to solve real-world data analysis problems.

By the end of this book, you will be able to build machine learning systems using techniques and methodologies such as classification, sentiment analysis, computer vision, reinforcement learning, and neural networks.

What you will learn

  • Build a classification system that can be applied to text, images, and sound
  • Employ Amazon Web Services (AWS) to run analysis on the cloud
  • Solve problems related to regression using scikit-learn and TensorFlow
  • Recommend products to users based on their past purchases
  • Understand different ways to apply deep neural networks on structured data
  • Address recent developments in the field of computer vision and reinforcement learning

Who this book is for

Building Machine Learning Systems with Python is for data scientists, machine learning developers, and Python developers who want to learn how to build increasingly complex machine learning systems. You will use Python's machine learning capabilities to develop effective solutions. Prior knowledge of Python programming is expected.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Building Machine Learning Systems with Python est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Building Machine Learning Systems with Python par Luis Pedro Coelho, Willi Richert, Matthieu Brucher en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Data Modelling & Design. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2018
ISBN
9781788622226

Classification II – Sentiment Analysis

For companies, it is vital to closely monitor the public reception of key events, such as product launches or press releases. With real-time access and easy accessibility of user-generated content on Twitter, it is now possible to do sentiment classification of tweets. Sometimes also called opinion mining, it is an active field of research in which several companies are already selling such services. As this shows that there obviously exists a market, we are motivated to use our classification muscles built in the last chapter to build our own home-grown sentiment classifier.

Sketching our roadmap

Sentiment analysis of tweets is particularly hard, because of Twitter's size limitation per message. This leads to a special syntax, creative abbreviations, and seldom-well-formed sentences. The typical approach of analyzing sentences, aggregating their sentiment information per paragraph, and then calculating the overall sentiment of a document does not work here.
Clearly, we will not try to build a state-of-the-art sentiment classifier. Instead, we want to do the following:
  • Use this scenario as a vehicle to introduce yet another classification algorithm, NaĂŻve Bayes
  • Explain how Part Of Speech (POS) tagging works and how it can help us
  • Show some more tricks from the scikit-learn toolbox that can come in handy

Fetching the Twitter data

Naturally, we need tweets and their corresponding labels that describe sentiments. In this chapter, we will use the corpus from Niek Sanders, who has done an awesome job of manually labeling more than 5,000 tweets as positive, negative, or neutral and has granted us permission to use it in this chapter.
To comply with Twitter terms of services, we will not provide any data from Twitter nor show any real tweets in this chapter. Instead, we can use Sander's hand-labeled data, which contains the tweet IDs and their hand-labeled sentiments. We will use Twitter's API to fetch the corresponding tweets one by one. To not bore you too much, just execute the first part of the corresponding Jupyter notebook, which will start the downloading process. In order to play nicely with Twitter's servers, it will take quite some time to download all the data for more than 5,000 tweets, which means it is a good idea to start it right away.
The data comes with four sentiment labels, which are returned by load_sanders_data():
>>> X_orig, Y_orig = load_sanders_data()
>>> classes = np.unique(Y_orig)
>>> for c in classes: print("#%s: %i" % (c, sum(Y_orig == c)))
#irrelevant: 437 #negative: 448 #neutral: 1801 #positive: 391
Inside load_sanders_data(), we are treating irrelevant and neutral labels together as neutral, and dropping all non-English tweets, resulting in 3,077 tweets.
In case you get different counts here, it is because, in the meantime, tweets might have been deleted or set to be private. In that case, you might also get slightly different numbers and graphs than the ones shown in the upcoming sections.

Introducing the NaĂŻve Bayes classifier

NaĂŻve Bayes is probably one of the most elegant machine learning algorithms out there that is of practical use. And despite its name, it is not that naĂŻve when you look at its classification performance. It proves to be quite robust to irrelevant features, which it kindly ignores. It learns fast and predicts equally so. It does not require lots of storage. So, why is it called naĂŻve?
The NaĂŻve was added to account for one assumption that is required for NaĂŻve Bayes to work optimally. The assumption is that the features are uncorrelated. This, however, is rarely the case for real-world applications. Nevertheless, it still returns very good accuracy in practice, even when the independence assumption does not hold.

Getting to know the Bayes theorem

At its core, the NaĂŻve Bayes classification is nothing more than keeping track of whi...

Table des matiĂšres

  1. Title Page
  2. Copyright and Credits
  3. Packt Upsell
  4. Contributors
  5. Preface
  6. Getting Started with Python Machine Learning
  7. Classifying with Real-World Examples
  8. Regression
  9. Classification I – Detecting Poor Answers
  10. Dimensionality Reduction
  11. Clustering – Finding Related Posts
  12. Recommendations
  13. Artificial Neural Networks and Deep Learning
  14. Classification II – Sentiment Analysis
  15. Topic Modeling
  16. Classification III – Music Genre Classification
  17. Computer Vision
  18. Reinforcement Learning
  19. Bigger Data
  20. Where to Learn More About Machine Learning
  21. Other Books You May Enjoy
Normes de citation pour Building Machine Learning Systems with Python

APA 6 Citation

Coelho, L. P., Richert, W., & Brucher, M. (2018). Building Machine Learning Systems with Python (3rd ed.). Packt Publishing. Retrieved from https://www.perlego.com/book/778142/building-machine-learning-systems-with-python-explore-machine-learning-and-deep-learning-techniques-for-building-intelligent-systems-using-scikitlearn-and-tensorflow-3rd-edition-pdf (Original work published 2018)

Chicago Citation

Coelho, Luis Pedro, Wilhelm Richert, and Matthieu Brucher. (2018) 2018. Building Machine Learning Systems with Python. 3rd ed. Packt Publishing. https://www.perlego.com/book/778142/building-machine-learning-systems-with-python-explore-machine-learning-and-deep-learning-techniques-for-building-intelligent-systems-using-scikitlearn-and-tensorflow-3rd-edition-pdf.

Harvard Citation

Coelho, L. P., Richert, W. and Brucher, M. (2018) Building Machine Learning Systems with Python. 3rd edn. Packt Publishing. Available at: https://www.perlego.com/book/778142/building-machine-learning-systems-with-python-explore-machine-learning-and-deep-learning-techniques-for-building-intelligent-systems-using-scikitlearn-and-tensorflow-3rd-edition-pdf (Accessed: 14 October 2022).

MLA 7 Citation

Coelho, Luis Pedro, Wilhelm Richert, and Matthieu Brucher. Building Machine Learning Systems with Python. 3rd ed. Packt Publishing, 2018. Web. 14 Oct. 2022.