ENGLISH

Artificial Intelligence with Python Cookbook: Proven recipes for applying AI algorithms and deep learning techniques using TensorFlow 2.x and PyTorch 1.6

Book information

Publisher
Packt Publishing
Year
2020
ISBN
9781789133967
Language
english
Format
PDF
Filesize
14 MB (15182621 bytes)
Pages
\459
Time added
2022-07-09 00:07:25

Description

Work through practical recipes to learn how to solve complex machine learning and deep learning problems using Python Key Features Get up and running with artificial intelligence in no time using hands-on problem-solving recipes Explore popular Python libraries and tools to build AI solutions for images, text, sounds, and images Implement NLP, reinforcement learning, deep learning, GANs, Monte-Carlo tree search, and much more Book Description Artificial intelligence (AI) plays an integral role in automating problem-solving. This involves predicting and classifying data and training agents to execute tasks successfully. This book will teach you how to solve complex problems with the help of independent and insightful recipes ranging from the essentials to advanced methods that have just come out of research. Artificial Intelligence with Python Cookbook starts by showing you how to set up your Python environment and taking you through the fundamentals of data exploration. Moving ahead, you'll be able to implement heuristic search techniques and genetic algorithms. In addition to this, you'll apply probabilistic models, constraint optimization, and reinforcement learning. As you advance through the book, you'll build deep learning models for text, images, video, and audio, and then delve into algorithmic bias, style transfer, music generation, and AI use cases in the healthcare and insurance industries. Throughout the book, you'll learn about a variety of tools for problem-solving and gain the knowledge needed to effectively approach complex problems. By the end of this book on AI, you will have the skills you need to write AI and machine learning algorithms, test them, and deploy them for production. What you will learn Implement data preprocessing steps and optimize model hyperparameters Delve into representational learning with adversarial autoencoders Use active learning, recommenders, knowledge embedding, and SAT solvers Get to grips with probabilistic modeling with TensorFlow probability Run object detection, text-to-speech conversion, and text and music generation Apply swarm algorithms, multi-agent systems, and graph networks Go from proof of concept to production by deploying models as microservices Understand how to use modern AI in practice Who this book is for This AI machine learning book is for Python developers, data scientists, machine learning engineers, and deep learning practitioners who want to learn how to build artificial intelligence solutions with easy-to-follow recipes. You'll also find this book useful if you're looking for state-of-the-art solutions to perform different machine learning tasks in various use cases. Basic working knowledge of the Python programming language and machine learning concepts will help you to work with code effectively in this book. Table of Contents Getting Started with Artificial Intelligence in Python Advanced Topics in Supervised Machine Learning Patterns, Outliers, and Recommendations Probabilistic Modeling Heuristic Search Techniques and Logical Inference Deep Reinforcement Learning Advanced Image Applications Working with Moving Images Deep Learning in Audio and Speech Natural Language Processing Artificial Intelligence in Production Cover Title Page Copyright and Credits About Packt Contributors Table of Contents Preface Chapter 1: Getting Started with Artificial Intelligence in Python Technical requirements Setting up a Jupyter environment Getting ready How to do it... Installing libraries with Google Colab Self-hosting a Jupyter Notebook environment How it works... There's more... See also Getting proficient in Python for AI Getting ready How to do it... Obtaining the history of Jupyter commands and outputs Execution history Outputs Auto-reloading packages Debugging Timing code execution Displaying progress bars Compiling your code Speeding up pandas DataFrames Parallelizing your code See also Classifying in scikit-learn, Keras, and PyTorch Getting ready How to do it... Visualizing data in seaborn Modeling in scikit-learn Modeling in Keras Modeling in PyTorch How it works... Neural network training The SELU activation function Softmax activation Cross-entropy See also Modeling with Keras Getting ready How to do it... Data loading and preprocessing Model training How it works... Maximal information coefficient Data generators Permutation importance See also Chapter 2: Advanced Topics in Supervised Machine Learning Technical requirements Transforming data in scikit-learn Getting ready How to do it... Encoding ranges numerically Deriving higher-order features Combining transformations How it works... There's more... See also Predicting house prices in PyTorch Getting ready How to do it... How it works... There's more... See also Live decisioning customer values Getting ready How to do it... How it works... Active learning Hoeffding Tree Class weighting See also Battling algorithmic bias Getting ready How to do it... How it works... There's more... See also Forecasting CO2 time series Getting ready How to do it... Analyzing time series using ARIMA and SARIMA How it works... There's more... See also Chapter 3: Patterns, Outliers, and Recommendations Clustering market segments Getting ready How to do it... How it works... There's more... See also Discovering anomalies Getting ready How to do it... How it works... k-nearest neighbors Isolation forest Autoencoder See also Representing for similarity search Getting ready How to do it... Baseline – string comparison functions Bag-of-characters approach Siamese neural network approach How it works... Recommending products Getting ready How to do it... How it works... Precision at k Matrix factorization The lightfm model See also Spotting fraudster communities Getting ready How to do it... Creating an adjacency matrix Community detection algorithms Evaluating the communities How it works... Graph community algorithms Louvain algorithm Girvan–Newman algorithm Information entropy There's more... See also Chapter 4: Probabilistic Modeling Technical requirements Predicting stock prices with confidence Getting ready How to do it... How it works... Featurization Platt scaling Isotonic regression Naive Bayes See also Estimating customer lifetime value Getting ready How to do it... How it works... The BG/NBD model The Gamma-Gamma model See also Diagnosing a disease Getting ready How to do it... How it works... Aleatoric uncertainty Negative log-likelihood Bernoulli distribution Metrics See also Stopping credit defaults Getting ready How to do it... How it works... Epistemic uncertainty See also Chapter 5: Heuristic Search Techniques and Logical Inference Making decisions based on knowledge Getting ready How to do it... Logical reasoning Knowledge embedding How it works... Logical reasoning Logic provers Knowledge embedding Graph embedding with Walklets See also Solving the n-queens problem Getting ready How to do it... Genetic algorithm  Particle swarm optimization SAT solver How it works... Genetic algorithm Particle swarm optimization SAT solver See also Finding the shortest bus route Getting ready How to do it... Simulated annealing Ant colony optimization How it works... Simulated annealing Ant colony optimization See also Simulating the spread of a disease Getting ready How to do it... How it works... There's more... See also Writing a chess engine with Monte Carlo tree search Getting ready How to do it... Tree search Implementing a node Playing chess How it works... There's more... See also Chapter 6: Deep Reinforcement Learning Technical requirements Optimizing a website How to do it... How it works... See also Controlling a cartpole Getting ready How to do it... How it works... There's more... Watching our agents in the environment Using the RLlib library See also  Playing blackjack Getting ready How to do it... How it works... See also Chapter 7: Advanced Image Applications Technical requirements Recognizing clothing items Getting ready How to do it... Difference of Gaussians Multilayer perceptron LeNet5 MobileNet transfer learning How it works... Difference of Gaussian LeNet5 MobileNet transfer learning See also Generating images Getting ready How to do it... How it works... See also Encoding images and style Getting ready How to do it... How it works... See also Chapter 8: Working with Moving Images Technical requirements Localizing objects Getting ready How to do it... How it works... There's more... See also Faking videos Getting ready How to do it... How it works... See also Deep fakes Detection of deep fakes Chapter 9: Deep Learning in Audio and Speech Technical requirements Recognizing voice commands Getting ready How to do it... How it works... See also Synthesizing speech from text Getting ready How to do it... How it works... Deep Convolutional Networks with Guided Attention WaveGAN There's more... See also Generating melodies Getting ready How to do it... How it works... See also Chapter 10: Natural Language Processing Technical requirements Classifying newsgroups Getting ready How to do it... Bag-of-words Word embeddings Custom word embeddings How it works... The CBOW algorithm TFIDF There's more... See also Chatting to users Getting ready How to do it... How it works... ELIZA Eywa See also Translating a text from English to German Getting ready How to do it... How it works... There's more... See also Writing a popular novel Getting ready How to do it... How it works... See also Chapter 11: Artificial Intelligence in Production Technical requirements Visualizing model results Getting ready How to do it... Streamlit hello-world Creating our data app How it works... See also Serving a model for live decisioning Getting ready How to do it... How it works... Monitoring See also Securing a model against attack Getting ready How to do it... How it works... Differential privacy Private aggregation of teacher ensembles See also Other Books You May Enjoy Index

Similar books