ML Unit-1
ML Unit-1
Artificial Intelligence:
Artificial Intelligence is composed of two words Artificial and Intelligence, where Artificial
defines "man-made," and intelligence defines "thinking power", hence AI means "a man-
made thinking power."
"It is a branch of computer science by which we can create intelligent machines which can
behave like a human, think like humans, and able to make decisions."
Artificial intelligence (AI) is the simulation of human intelligence in machines that are
programmed to think and act like humans. Learning, reasoning, problem-solving, perception,
and language comprehension are all examples of cognitive abilities.
Intelligence: The ability to learn and solve problems. This definition is taken from webster’s
Dictionary.
Reasoning
Learning
Problem-Solving
Perception
Linguistic Intelligence
The most common answer that one expects is “to make computers intelligent so that they
can act intelligently!”
1. Healthcare: AI is used for medical diagnosis, drug discovery, and predictive analysis
of diseases.
2. Finance: AI helps in credit scoring, fraud detection, and financial forecasting.
3. Retail: AI is used for product recommendations, price optimization, and supply chain
management.
4. Manufacturing: AI helps in quality control, predictive maintenance, and production
optimization.
5. Transportation: AI is used for autonomous vehicles, traffic prediction, and route
optimization.
6. Customer service: AI-powered chatbots are used for customer support, answering
frequently asked questions, and handling simple requests.
7. Security: AI is used for facial recognition, intrusion detection, and cybersecurity
threat analysis.
8. Marketing: AI is used for targeted advertising, customer segmentation, and sentiment
analysis.
9. Education: AI is used for personalized learning, adaptive testing, and intelligent
tutoring systems.
Approaches of AI
Acting humanly (The Turing Test approach): This approach was designed by Alan
Turing. The ideology behind this approach is that a computer passes the test if a
human interrogator, after asking some written questions, cannot identify whether the
written responses come from a human or from a computer.
Thinking humanly (The cognitive modeling approach): The idea behind this
approach is to determine whether the computer thinks like a human.
Thinking rationally (The “laws of thought” approach): The idea behind this
approach is to determine whether the computer thinks rationally i.e. with logical
reasoning.
Acting rationally (The rational agent approach): The idea behind this approach is
to determine whether the computer acts rationally i.e. with logical reasoning.
Forms of AI:
1) Weak AI:
2) Strong AI:
3) Super Intelligence
High Accuracy with less errors: AI machines or systems are prone to less errors and
high accuracy as it takes decisions as per pre-experience or information.
High-Speed: AI systems can be of very high-speed and fast-decision making, because
of that AI systems can beat a chess champion in the Chess game.
High reliability: AI machines are highly reliable and can perform the same action
multiple times with high accuracy.
Useful for risky areas: AI machines can be helpful in situations such as defusing a
bomb, exploring the ocean floor, where to employ a human can be risky.
Digital Assistant: AI can be very useful to provide digital assistant to the users such
as AI technology is currently used by various E-commerce websites to show the
products as per customer requirement.
Useful as a public utility: AI can be very useful for public utilities such as a self-
driving car which can make our journey safer and hassle-free, facial recognition for
security purpose, Natural language processing to communicate with the human in
human-language, etc.
High Cost: The hardware and software requirement of AI is very costly as it requires
lots of maintenance to meet current world requirements.
Can't think out of the box: Even we are making smarter machines with AI, but still
they cannot work out of the box, as the robot will only do that work for which they
are trained, or programmed.
No feelings and emotions: AI machines can be an outstanding performer, but still it
does not have the feeling so it cannot make any kind of emotional attachment with
human, and may sometime be harmful for users if the proper care is not taken.
Increase dependency on machines: With the increment of technology, people are
getting more dependent on devices and hence they are losing their mental capabilities.
No Original Creativity: As humans are so creative and can imagine some new ideas
but still AI machines cannot beat this power of human intelligence and cannot be
creative and imaginative.
Deep learning:
Deep learning is a branch of machine learning which is based on artificial neural networks. It
is capable of learning complex patterns and relationships within data. In deep learning, we
don’t need to explicitly program everything. It has become increasingly popular in recent
years due to the advances in processing power and the availability of large datasets. Because
it is based on artificial neural networks (ANNs) also known as deep neural networks (DNNs).
These neural networks are inspired by the structure and function of the human brain’s
biological neurons, and they are designed to learn from large amounts of data.
1. Deep Learning is a subfield of Machine Learning that involves the use of neural
networks to model and solve complex problems. Neural networks are modeled after
the structure and function of the human brain and consist of layers of interconnected
nodes that process and transform data.
2. The key characteristic of Deep Learning is the use of deep neural networks, which
have multiple layers of interconnected nodes. These networks can learn complex
representations of data by discovering hierarchical patterns and features in the data.
Deep Learning algorithms can automatically learn and improve from data without the
need for manual feature engineering.
3. Deep Learning has achieved significant success in various fields, including image
recognition, natural language processing, speech recognition, and recommendation
systems. Some of the popular Deep Learning architectures include Convolutional
Neural Networks (CNNs), Recurrent Neural Networks (RNNs), and Deep Belief
Networks (DBNs).
4. Training deep neural networks typically requires a large amount of data and
computational resources. However, the availability of cloud computing and the
development of specialized hardware, such as Graphics Processing Units (GPUs), has
made it easier to train deep neural networks.
In summary, Deep Learning is a subfield of Machine Learning that involves the use of deep
neural networks to model and solve complex problems. Deep Learning has achieved
significant success in various fields, and its use is expected to continue to grow as more data
becomes available, and more powerful computing resources become available.
In a fully connected Deep neural network, there is an input layer and one or more hidden
layers connected one after the other. Each neuron receives input from the previous layer
neurons or the input layer. The output of one neuron becomes the input to other neurons in
the next layer of the network, and this process continues until the final layer produces the
output of the network. The layers of the neural network transform the input data through a
series of nonlinear transformations, allowing the network to learn complex representations of
the input data.
Computer vision
In computer vision, Deep learning models can enable machines to identify and understand
visual data. Some of the main applications of deep learning in computer vision include:
Object detection and recognition: Deep learning model can be used to identify and locate
objects within images and videos, making it possible for machines to perform tasks such as
self-driving cars, surveillance, and robotics.
Image classification: Deep learning models can be used to classify images into categories
such as animals, plants, and buildings. This is used in applications such as medical imaging,
quality control, and image retrieval.
Image segmentation: Deep learning models can be used for image segmentation into
different regions, making it possible to identify specific features within images.
In NLP, the Deep learning model can enable machines to understand and generate human
language. Some of the main applications of deep learning in NLP include:
Automatic Text Generation – Deep learning model can learn the corpus of text and new text
like summaries, essays can be automatically generated using these trained models.
Language translation: Deep learning models can translate text from one language to
another, making it possible to communicate with people from different linguistic
backgrounds.
Sentiment analysis: Deep learning models can analyze the sentiment of a piece of text,
making it possible to determine whether the text is positive, negative, or neutral. This is
used in applications such as customer service, social media monitoring, and political
analysis.
Speech recognition: Deep learning models can recognize and transcribe spoken words,
making it possible to perform tasks such as speech-to-text conversion, voice search, and
voice-controlled devices.
Inference: The model is applied to the input to compute results. These results are
wrong sometimes. A mechanism is built into the application to gather user feedback
on such occasions.
Let’s take the problem of detecting email spam and compare both methods.
Traditional programs detect spam by checking an email against a fixed set of heuristic rules.
For example:
Does the email contain FREE, weight loss, or lottery several times?
Did it come from known spammer domain/IP addresses?
Prepare a data set: a large number of emails labeled manually as spam or not-spam.
Train, test, and tune models, and select the best.
During inference, apply the model to decide whether to keep an email in the inbox or
in the spam folder.
If the user moves an email from inbox to spam or vice versa, add this feedback to the
training data.
Retrain the model to be up-to-date with the spam trends
Data Dependency:
Traditional Programming: Relies less on data. The quality of the output depends mainly on
the logic defined by the programmer.
Machine Learning: Heavily reliant on data
Traditional Programming: Has limited flexibility. Changes in the problem domain require
manual updates to the code.
Machine Learning: Offers higher adaptability to new scenarios, especially if the model is
retrained with updated data.
Problem Complexity:
Traditional Programming: Best suited for problems with clear, deterministic logic.
Machine Learning: Better for dealing with complex problems where patterns and
relationships are not evident, such as image recognition, natural language processing, or
predictive analytics.
Development Process:
Outcome Predictability:
Traditional Programming: The outcome is highly predictable if the inputs and the logic are
known.
Machine Learning: Predictions or decisions made by a machine learning model can
sometimes be less interpretable, especially with complex models like deep neural networks.