Learn AI with Python: Explore Machine Learning and Deep Learning techniques for Building Smart AI Systems Using Scikit-Learn, NLTK, NeuroLab, and Keras (English Edition)
5/5
()
Machine Learning
Deep Learning
Artificial Intelligence
Natural Language Processing
Speech Recognition
Reinforcement Learning
Computer Vision
Regression
Supervised Learning
Logic Programming
About this ebook
This book introduces you to artificial intelligence and walks you through the process of establishing an AI environment on a variety of platforms. It dives into machine learning models and various predictive modeling techniques, including classification, regression, and clustering. Additionally, it provides hands-on experience with logic programming, ASR, neural networks, and natural language processing through real-world examples and fully functional Python implementation. Finally, the book deals with profound models of learning such as R-CNN and YOLO. Object detection in images is also explained in detail using Convolutional Neural Networks (CNNs), which are also explained.
By the end of this book, you will have a firm grasp of machine learning and deep learning techniques, as well as a steered methodology for formulating and solving related problems.
Related to Learn AI with Python
Related ebooks
AI Crash Course: A fun and hands-on introduction to machine learning, reinforcement learning, deep learning, and artificial intelligence with Python Rating: 2 out of 5 stars2/5Artificial Intelligence Programming with Python: From Zero to Hero Rating: 4 out of 5 stars4/5Python Machine Learning By Example Rating: 4 out of 5 stars4/5Machine Learning with Tensorflow: A Deeper Look at Machine Learning with TensorFlow Rating: 0 out of 5 stars0 ratingsArtificial Intelligence: The Complete Beginner’s Guide to the Future of A.I. Rating: 4 out of 5 stars4/5Advanced Machine Learning with Python Rating: 0 out of 5 stars0 ratingsInside Generative AI: A Deep Dive Into Generative AI For Beginners, Professionals, and New Career Seekers Rating: 0 out of 5 stars0 ratingsArtificial Intelligence with Python - Second Edition: Your complete guide to building intelligent apps using Python 3.x, 2nd Edition Rating: 0 out of 5 stars0 ratingsPython Machine Learning Illustrated Guide For Beginners & Intermediates:The Future Is Here! Rating: 5 out of 5 stars5/5TensorFlow in 1 Day: Make your own Neural Network Rating: 4 out of 5 stars4/5Artificial Intelligence with Python Rating: 4 out of 5 stars4/5Advanced Deep Learning with Python: Design and implement advanced next-generation AI solutions using TensorFlow and PyTorch Rating: 0 out of 5 stars0 ratingsDeep Learning Fundamentals in Python Rating: 4 out of 5 stars4/5Machine Learning For Beginners Guide Algorithms: Supervised & Unsupervsied Learning. Decision Tree & Random Forest Introduction Rating: 0 out of 5 stars0 ratingsPythonic AI: A beginner's guide to building AI applications in Python (English Edition) Rating: 5 out of 5 stars5/5
Programming For You
Learn SQL in 24 Hours Rating: 5 out of 5 stars5/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5Python: Learn Python in 24 Hours Rating: 4 out of 5 stars4/5JavaScript All-in-One For Dummies Rating: 5 out of 5 stars5/5Microsoft Azure For Dummies Rating: 0 out of 5 stars0 ratingsSQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Python Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5Mastering JavaScript: The Complete Guide to JavaScript Mastery Rating: 5 out of 5 stars5/5Linux: Learn in 24 Hours Rating: 5 out of 5 stars5/5SQL All-in-One For Dummies Rating: 3 out of 5 stars3/5Python Data Structures and Algorithms Rating: 5 out of 5 stars5/5Godot from Zero to Proficiency (Foundations): Godot from Zero to Proficiency, #1 Rating: 5 out of 5 stars5/5Excel 101: A Beginner's & Intermediate's Guide for Mastering the Quintessence of Microsoft Excel (2010-2019 & 365) in no time! Rating: 0 out of 5 stars0 ratingsPYTHON: Practical Python Programming For Beginners & Experts With Hands-on Project Rating: 5 out of 5 stars5/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Learn NodeJS in 1 Day: Complete Node JS Guide with Examples Rating: 3 out of 5 stars3/5Python for Data Science For Dummies Rating: 0 out of 5 stars0 ratingsExcel 2021 Rating: 4 out of 5 stars4/5PYTHON PROGRAMMING Rating: 4 out of 5 stars4/5Algorithms For Dummies Rating: 4 out of 5 stars4/5
Reviews for Learn AI with Python
1 rating0 reviews
Book preview
Learn AI with Python - Gaurav Leekha
CHAPTER 1
Introduction to AI and Python
Introduction
What’s the very first thing that comes into your mind when you think of Artificial Intelligence (AI)? It may be an automated machine, robots, or an image of the brain with some processing. If yes, then your understanding of AI is appropriate but vague. So, you may be wondering, what exactly the concept of AI is? This chapter provides a brief overview of AI. It covers various fields of study in AI, real-life applications of AI, and agents and environments. This chapter also addresses the Python programming language, one of the most popular programming languages used by developers today for building AI applications. It also highlights features of Python, its installation, and steps to run the Python script.
Structure
In this chapter, we will discuss the following topics:
Introduction to Artificial Intelligence (AI)
Learning AI
Understanding intelligence
Various fields of study in AI
Application of AI in various industries
How does artificial intelligence learn?
AI – agents and environments
AI and Python – how do they relate?
Python3 – installation and setup
Objectives
After studying this unit, you will understand the basics of AI. You will also learn various fields of study in AI and its applications in various industries. You will be able to install Python 3 on Windows, Linux, and Mac OS X. You will also understand the reason for choosing Python for AI projects.
Introduction to Artificial Intelligence (AI)
John McCarthy, an American computer scientist, who was a pioneer and an inventor, coined the term Artificial Intelligence (AI) in his 1955 proposal for the 1956 Dartmouth Conference, the first artificial intelligence conference. According to him, AI is The science and engineering of making intelligent machines, especially intelligent computer programs.
As we can see, Artificial Intelligence is composed of two words, first is Artificial, which means man-made, and second is Intelligence, which means thinking power. Hence, we can say that AI means a man-made thinking power. We can define AI as:
A branch of information technology by which we can create intelligent machines that can think like a human, behave like a human, and also able to make the decisions at its own.
AI is accomplished by studying how humans think, learn, and decide while trying to solve a problem, and then using this outcome as a base for developing intelligent machines. The best part of AI is that we do not have to preprogram a machine, instead we can create a machine with programmed algorithms that can work with its own intelligence.
Why to learn AI?
Are machines capable of thinking? This is a simple question that is very difficult to answer. Different researchers defined terms such as thought or intelligence in different ways. When we look more closely at AI, this is just one of the problems that are encountered.
But, one thing is clear that the current progress in the development of algorithms, combined with greater processing power and exponential growth in the amount of available data, means that AI is now capable of developing systems that can perform tasks that were previously viewed as the exclusive domain of human beings. Some of the capabilities of AI, due to which we should learn it, are as follows:
AI is capable of learning through data: In our day-to-day life, we deal with huge amounts of data and our mind can’t keep track of such huge data. AI’s capability of learning through data helps us to automate things.
AI is capable of teaching itself: In this digital era, data itself keep changing at a rapid pace, so the knowledge that is derived from such data must also be updated constantly. To fulfill this purpose, a system should be intelligent, and AI can help us to create such intelligent systems.
AI can respond in real time: If you use the internet regularly, you’re probably using some real-time applications in the fields of e-commerce, healthcare, retail, manufacturing, self-driving cars, and so on. AI along with the help of neural networks can analyze the data more deeply and hence can respond to the situations that are based on the conditions in real time.
AI can achieve a greater degree of accuracy: Deep learning, a subset of machine learning, extends the potential of AI to more complex tasks that can only be computed through multiple steps. These tasks are often performed with a greater degree of accuracy.
Understanding intelligence
To build AI applications (smart systems that can think and act like a human), it’s necessary to understand the concept of intelligence. As discussed before, different researchers defined terms such as thought or intelligence in different ways. Let’s define intelligence keeping in mind the scope of AI:
Ability to take decisions: From a set of many deciding factors, it’s important to take the optimal, correct, and accurate decisions. This measures intelligence in a generic way as well as in terms of AI.
Ability to prove results: Another important factor that measures intelligence is the ability to prove that why this decision has been chosen.
Ability to think logically: Do you think, in this world, everything can be proved by mathematical formulae or proof? No, as humans, for many things, we need to apply our common sense, think logically, and conclude. This ability also measures intelligence.
Ability to learn and improve: How do we develop our experiences? Whenever we learn something new, we develop our experiences. These experiences help all of us to make better decisions and better opportunities in the future. This also measures intelligence in a generic way as well as in terms of AI because the more we learn from the external environment, the more we have the ability to improve ourselves.
Types of intelligence
According to Howard Gardner¹, an American development psychologist, there are eight multiple intelligences.
Linguistic–verbal intelligence: It is the ability to speak, recognize, and use the mechanism of phonology, syntax, and semantics. Some of the characteristics of people with linguistic–verbal intelligence are:
They enjoy reading and writing.
They can explain things very well.
They are good at debating or giving persuasive speeches.
They are also good at remembering written and spoken information.
For example, writers, narrators, teachers, and journalists.
Musical intelligence: It is the ability to create, communicate, and understand pitch, rhythm, and meaning of sounds. Some of the characteristics of people with musical intelligence are:
They enjoy singing as well as playing musical instruments.
They can recognize musical patterns and tones easily.
They are good at remembering songs and melodies.
They have a great understanding of musical structure, rhythm, and notes.
For example, musicians, singers, music teachers, and composers.
Logical–mathematical intelligence: It is the ability to use, understand relationships in the absence of action or objects, and understand complex as well as abstract ideas. Some of the characteristics of people with logical–-mathematical intelligence are:
They have excellent problem-solving skills.
They enjoy thinking about abstract ideas.
They are good at solving scientific experiments.
They also like conducting scientific experiments.
For example, mathematicians, engineers, computer programmers, and scientists.
Visual–spatial intelligence: It is the ability to perceive visual information, change it, re-create images without reference to the objects, construct 3-dimensional images, move, and rotate them. Some of the characteristics of people with visual–spatial intelligence are:
They enjoy drawing and painting.
They recognize patterns very easily.
They are good at interpreting pictures, graphs, and charts.
They are also good at putting puzzles together.
For example, architects, artists, astronauts, and physicists.
Bodily kinesthetic intelligence: It is the ability to use part of or complete body to solve problems. It is the control of fine and coarse motor skills. Some of the characteristics of people with bodily kinesthetic intelligence are:
They have excellent physical coordination.
They enjoy creating things by themselves.
They are good at dancing and sports.
For example, players, builders, actors, and dancers.
Intra-personal intelligence: It is the ability to distinguish among one’s feelings, intentions, and motivations. Some of the characteristics of people with intra-personal intelligence are:
They are good at analyzing their strengths and weaknesses.
They enjoy analyzing and learning through theories and ideas.
They have excellent self-awareness.
They understand the basis for their motivations as well as feelings.
For example, writers, theorists, and scientists.
Inter-personal intelligence: Unlike intra-personal intelligence, it is the ability to recognize and make distinctions among other feelings, beliefs, and intentions. Some of the characteristics of people with interpersonal intelligence are:
They are good at communicating verbally.
They are also skilled at nonverbal communication.
They always tend to create a positive relationship with others.
They are also good at resolving conflicts in groups.
For example, psychologists, philosophers, and politicians.
Naturalistic intelligence: It is the ability to explore the environment and learning about other species. The individuals who have this type of intelligence are said to be highly aware of even the smallest changes. Some of the characteristics of people with naturalistic intelligence are:
They would be interested in studying subjects such as botany, biology, and zoology.
They enjoy camping, gardening, hiking, and outdoor activities.
They don’t enjoy learning topics that have no relation to nature.
For example, farmer, gardener, biologist, and conservationist.
A system is artificially intelligent if it is equipped with at least one or at most all intelligence in it.
Various fields of study in AI
As soon as we start thinking about AI, various terms like Machine Learning (ML), Deep Learning (DL), Natural Language Processing (NLP), Data Science, Statistical Analysis, Artificial Neural Network (ANN), Genetic Algorithms, and so on come into our mind. But if we see broadly, AI is not an isolated domain, it’s an umbrella of every technology that helps transcend human capabilities. Let’s have a look at some of the fields of study within AI:
Machine Learning (ML): Machine Learning, one of the most popular fields of study, is a subset of AI that allows machines to learn on their own as humans can learn from their experiences. It learns from the dataset and makes predictions.
Deep Learning (DL): Deep Learning is a subset of ML concerned with algorithms inspired by the function of the brain called ANN. It makes the computation of a multi-layer neural network possible.
Logic: According to the Oxford dictionary, Logic is the reasoning conducted or assessed according to strict principles and validity. To an extent, it carries the same meaning in AI as well. We can define logic as proof of validation behind any reason provided. But why it’s important to include logic in AI? It’s because we want our system (agent) to think like humans, and for doing so, it should be capable of making the decision based on the current situation.
Knowledge Representation: We humans are best at understanding, reasoning, and interpreting knowledge because as per our knowledge, we can perform various actions in the real world. But how machines can do all these things comes under Knowledge Representation (KR). KR is concerned with AI agents thinking and how thinking contributes to the intelligent behavior of agents. Intelligence is dependent on knowledge because an AI agent will only be able to accurately act on the input when it has some knowledge or experience about that input.
Applications of AI in various industries
Artificial intelligence, machine learning, and deep learning are here, growing, and with each passing day they are making machines smarter and smarter. In fact, they are becoming a disruptive force that is redefining today’s world. They have come roaring out of high-tech labs to become something that we use every day without even realizing it. Also, the acceleration we have seen in recent years shows no signs of slowing down. With applications ranging from heavy industry to healthcare, the presence and importance of AI and ML technology are being felt across a broad spectrum of industries. Let’s have a look at the top five fast-growing industries that are tremendously reaping the benefits of this technology:
Education: Education is the backbone of any nation. AI is improving the education system by replacing traditional techniques with personalized, and immersive learning techniques. This way, it helps teachers to tailor students’ weaknesses. Two of the realities of immersive learning are Augmented Reality (AR) and Virtual Reality (VR). Augmented reality is a type of software that uses the device’s camera to overlay digital aspects into the real world. It facilitates the teachers and the trainers in performing those tasks, in a safe environment, which they previously could not. On the other hand, virtual reality creates a 360-degree view digital environment, which allows students to interact directly with the study material by using e-learning resources on mobile devices.
Healthcare: One of the latest advancements in healthcare is Google’s Medical Brain, which is enabled with a new type of AI algorithm. Google’s Medical Brain is used to make predictions about the likelihood of death among patients. AI is also helping the laboratory segment of healthcare with ML-enabled laboratory robots that can study new molecules and reactions. In recent years, cancer has been one of the leading causes of death. Companies like Infervision have developed an AI-based system, which is trained with suitable algorithms, to review CT scans and detect early signs of cancer. In this coronavirus pandemic phase, AI is also used to accurately forecast infections, deaths, and recovery timelines of the COVID-19.
Automobiles: Driverless or self-driving vehicles are not a sci-fi thing anymore. With huge advancements in AI, it became a reality now. Tech giants such as Google, Apple, Amazon, Cisco, Intel, and Bosch are leading the R&D in autonomous driving. Whereas automobile companies such as General Motors (GM), Tesla, BMW, and Mercedes are some serious players in the self-driving vehicle game. Autonomai, enabled with Deep Learning and AI capabilities, is an autonomous middleware platform developed by an Indian company named Tata ELEXSI. It’s not far when we will see and use self-driving vehicles on Indian roads as well.
E-Commerce: In this e-commerce and digital era, we all have the experience of online shopping and we sometimes also buy the stuff that is not required at all or we seldom use. The new strategy of e-commerce companies is to sell the stuff to their customers even before they realize the need for it. Companies achieve this by realizing their customers' preferences and various other factors like attractive deals, special coupons, and discounts. This strategy is called ‘purchase recommendations’ or ‘intuitive selling’, which is purely based on AI algorithms. For example, by using AI algorithms and computer vision, Amazon go is redefining the way of shopping in supermarkets. It adds the items automatically in customers’ virtual cart and once the customer leaves the store, adds the charges on the Amazon account. So, no more lines at the time of checkout.
Digital marketing: Imagine how effective marketing becomes if most of the time-consuming tasks such as identifying the right perspective, segmenting as well as targeting audiences, building a winning content strategy, and scheduling the release could be driven without human intervention. AI is bringing this power into marketing automation by using tools like Boomtrain, Phrases, Persado, Adext, RankBrain, Chatbots, and so on.
You may be wondering if AI, ML, and DL have any application(s) for day-to-day life or they are meant for industrial use only. Look around and you could see and feel AI-powered things and devices.
Following are some cool AI applications enhancing our lifestyle:
Virtual Personal Assistants (they are intelligent): Most of us are interacting with virtual personal assistants like Siri, Alexa, Cortana, and Google Now on a regular basis for getting the desired information. It’s AI technology with the help of which these VPAs continually learn information about us to provide better services. In fact, now we can use Google Assistant to talk to the ‘Tulips’ flower. Google and Wageningen University made it possible by mapping tulip signals to human signals on Google Assistant’s existing Neural Machine Translation. Google Assistant now added Tulipish as a language and offers translation between dozens of other human languages.