AI UNIT 1
AI UNIT 1
Basic Introduction
Artificial Intelligence (AI) refers to the simulation of human intelligence in machines that are
programmed to think and act like humans. It involves the development of algorithms and
computer programs that can perform tasks that typically require human intelligence such as
visual perception, speech recognition, decision-making, and language translation. AI has the
potential to revolutionize many industries and has a wide range of applications, from virtual
personal assistants to self-driving cars.
Intelligence: The ability to learn and solve problems. This definition is taken from webster’s
Dictionary.
The most common answer that one expects is “to make computers intelligent so that they
can act intelligently!”, but the question is how much intelligent? How can one judge
intelligence?
…as intelligent as humans. If the computers can, somehow, solve real-world problems, by
improving on their own from past experiences, they would be called “intelligent”.
Thus, the AI systems are more generic(rather than specific), can “think” and are more flexible.
AI requires a foundation of specialized hardware and software for writing and training machine
learning algorithms.
Intelligence, as we know, is the ability to acquire and apply knowledge. Knowledge is the
information acquired through experience. Experience is the knowledge gained through
exposure(training). Summing the terms up, we get artificial intelligence as the “copy of
something natural(i.e., human beings) ‘WHO’ is capable of acquiring and applying the
information it has gained through exposure.”
The main focus of artificial intelligence is towards understanding human behavior and
performance. This can be done by creating computers with human-like intelligence and
capabilities. This includes natural language processing, facial analysis and robotics.
• Reasoning- It is the set of processes that enables us to provide basis for judgement,
making decisions, and prediction.
• Learning- It is the activity of gaining knowledge or skill by studying, practising, being
taught, or experiencing something. Learning enhances the awareness of the subjects of
the study. 1
• Problem-Solving- It is the process in which one perceives and tries to arrive at a desired
solution from a present situation by taking some path, which is blocked by known or
unknown hurdles. Problem solving also includes decision making, which is the process
of selecting the best suitable alternative out of multiple alternatives to reach the desired
goal are available.
• Perception- It is the process of acquiring, interpreting, selecting, and organizing sensory
information. Perception presumes sensing.
• Linguistic Intelligence- It is one’s ability to use, comprehend, speak, and write the
verbal and written language. It is important in interpersonal communication.
1. To create expert systems that exhibit intelligent behavior with the capability to learn,
demonstrate, explain, and advise its users.
2. Helping machines find solutions to complex problems like humans do and applying
them as algorithms in a computer-friendly manner.
3. Improved efficiency: Artificial intelligence can automate tasks and processes that are
time-consuming and require a lot of human effort. This can help improve efficiency
and productivity, allowing humans to focus on more creative and high-level tasks.
4. Better decision-making: Artificial intelligence can analyze large amounts of data and
provide insights that can aid in decision-making. This can be especially useful in
domains like finance, healthcare, and logistics, where decisions can have significant
impacts on outcomes.
5. Enhanced accuracy: Artificial intelligence algorithms can process data quickly and
accurately, reducing the risk of errors that can occur in manual processes. This can
improve the reliability and quality of results.
6. Personalization: Artificial intelligence can be used to personalize experiences for users,
tailoring recommendations, and interactions based on individual preferences and
behaviors. This can improve customer satisfaction and loyalty.
7. Exploration of new frontiers: Artificial intelligence can be used to explore new frontiers
and discover new knowledge that is difficult or impossible for humans to access. This
can lead to new breakthroughs in fields like astronomy, genetics, and drug discovery. 2
Uses of Artificial Intelligence :
Artificial Intelligence has many practical applications across various industries and domains,
including:
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.
Artificial Intelligence has the potential to bring many benefits to society, but it also raises some
important issues that need to be addressed, including:
1. Bias and Discrimination: AI systems can perpetuate and amplify human biases,
leading to discriminatory outcomes.
2. Job Displacement: AI may automate jobs, leading to job loss and unemployment.
3. Lack of Transparency: AI systems can be difficult to understand and interpret, making
it challenging to identify and address bias and errors.
4. Privacy Concerns: AI can collect and process vast amounts of personal data, leading
to privacy concerns and the potential for abuse.
5. Security Risks: AI systems can be vulnerable to cyber attacks, making it important to
ensure the security of AI systems.
6. Ethical Considerations: AI raises important ethical questions, such as the acceptable
use of autonomous weapons, the right to autonomous decision making, and the
responsibility of AI systems for their actions.
7. Regulation: There is a need for clear and effective regulation to ensure the responsible
development and deployment of AI.
3
AI Techniques
Artificial Intelligence (AI) encompasses a wide range of techniques and approaches aimed at
creating systems that can perform tasks that typically require human intelligence. Here are
some key AI techniques:
4
1. Machine Learning (ML):
o Supervised Learning: Involves training a model on a labeled dataset, where the
algorithm learns patterns and relationships between inputs and corresponding
outputs.
o Unsupervised Learning: The algorithm learns from unlabeled data, finding
patterns and structures within the data without explicit guidance.
o Reinforcement Learning: Involves an agent learning to make decisions by
interacting with an environment, receiving feedback in the form of rewards or
penalties.
2. Deep Learning:
o A subset of machine learning that employs neural networks with multiple layers
(deep neural networks) to model complex patterns and representations.
o Deep learning has been particularly successful in tasks such as image and
speech recognition.
3. Natural Language Processing (NLP):
o Focuses on the interaction between computers and human languages, enabling
machines to understand, interpret, and generate human-like text.
o Applications include chatbots, language translation, sentiment analysis, and text
summarization.
4. Computer Vision:
o Involves teaching machines to interpret and understand visual information from
the world, such as images and videos.
o Applications include image recognition, object detection, and facial
recognition.
5. Expert Systems:
o Utilizes knowledge from human experts to make decisions in specific domains.
o Rule-based systems and knowledge representation are essential components of
expert systems.
6. Genetic Algorithms:
o Inspired by the process of natural selection, genetic algorithms involve evolving
solutions to optimization problems by applying principles of genetics, such as
mutation and crossover.
7. Fuzzy Logic:
o Deals with uncertainty and imprecision in decision-making by allowing for
degrees of truth.
o Useful in situations where traditional binary true/false logic may not be suitable.
8. Robotics:
o Integrates AI techniques with physical machines, enabling robots to perform
tasks in the real world.
o Involves computer vision, sensor integration, and decision-making algorithms.
9. Swarm Intelligence:
o Inspired by the collective behavior of social organisms, swarm intelligence
involves solving problems by simulating the decentralized, self-organized
behavior of a group.
10. Recommender Systems:
o Use AI to analyze user preferences and recommend items, such as movies,
books, or products.
11. AI Ethics and Explainability:
o As AI systems become more complex, there is a growing emphasis on ensuring 5
ethical behavior and making AI systems explainable to humans.
These techniques are often used in combination, depending on the specific requirements of a
given AI application. The field of AI is dynamic, with ongoing research and advancements
continually expanding the range of available techniques.
Problem-solving using AI
1. Defining the Problem: Clearly define the problem you want to solve. Whether
it's optimizing a process, making predictions, or automating tasks, understanding
the problem is crucial.
2. Data Collection and Preparation: Gather relevant data that can help in solving
the problem. This could involve structured data (tables, databases) or
unstructured data (text, images). Clean and preprocess the data to ensure its
quality and relevance.
3. Choosing the Right Technique:
4. Model Training and Validation: Train your AI model on a portion of the data and
validate its performance on another part (testing dataset). This step ensures your
model generalizes well to new, unseen data.
AI Models
AI models or artificial intelligence models are programs that detect specific patterns using a
collection of data sets. It is an illustration of a system that can receive data inputs and draw
conclusions or conduct actions depending on those conclusions. Once trained, an AI model can
be used to make future predictions or act on data that was not previously observed. AI models
can be used for a variety of activities, from image and video recognition to natural language
processing (NLP), anomaly detection, recommender systems, predictive modeling and
forecasting, and robotics and control systems.
Artificial Intelligence is one of the most fascinating fields of computer science. Artificial
Intelligence studies aim to create a machine that can replicate human intelligence in real-time.
AI model is a program or algorithm that relies on training data to recognize patterns and
make predictions or decisions. The more data points an AI model receives, the more accurate
it can be in its data analysis and forecasts.
AI models rely on computer vision, natural language processing, and Machine Learning to
recognize different patterns. AI models also use decision-making algorithms to learn from their
training, collect and review data points, and ultimately apply their learning to achieve their
predefined goals.
AI models are very good at solving complex problems with a large amount of data. As a result,
they can accurately solve complex problems with a very high degree of accuracy.
Working of AI Models
• Modeling: The first stage is to develop an artificial intelligence model, which employs
a complicated algorithm or layers of algorithms to analyze data and make judgments
based on that data. A good AI model can serve as a stand-in for human expertise.
• AI model training: The AI model must be trained in the second stage. Training often
entails running huge quantities of data through the AI model in recurrent test loops and
inspecting the results to confirm the accuracy and that the model is performing as
anticipated and required. To understand this method we must also understand the
difference between supervised and unsupervised learning;
1. Supervised learning refers to classified data sets that are labeled into correct
output, meaning the data provided have pre-existing relations between input data, the
model then makes use of this labeled data to discover the connections and trends
between the input data and the desired output. 7
2. Unsupervised learning is a sort of machine learning in which the model is not
given access to labeled data. Instead, the model must independently identify the
connections and trends in the data.
• Inference: Inference is the third step. This stage involves deploying the AI model into
its actual use case in real-life scenarios, where it regularly draws logical inferences from
the information at hand.
After being trained, an AI model can be utilized to make forecasts or perform actions based on
fresh, unforeseen data inputs. In essence AI models operate by processing input data, mining
it using algorithms and statistical techniques to uncover patterns and correlations, and then
using what they have discovered to anticipate or act upon subsequent data inputs.
• To build and train AI models, we first need to define the purpose and choose the model's
objectives. The remaining steps will be guided by the purpose a model is meant to serve.
• Work with a subject-matter expert to assess the data's quality. With a thorough grasp of
the data gathered, the data inputs must be accurate and devoid of errors. This
information is going to be utilized to train the model. These data should be accurate and
consistent, and they need to be pertinent to the purpose the AI is meant to serve.
• Select the ideal AI algorithm or model design like Decision trees, support vector
machines, and other popular techniques that are used to train AI models.
• Utilize the cleaned and prepared data to train the model. This usually entails putting the
input into the selected algorithm and employing a technique called backpropagation to
tweak the model's settings and boost efficiency.
• Check the correctness of the trained model and make any required corrections. This can
entail putting the model to the test on a different set of data and assessing how well it
predicts actual results.
• Once the model is performing to the appropriate degree of accuracy, fine-tune it and
repeat the training procedure. This may entail modifying the model's hyperparameters,
such as the learning rate, or employing techniques such as regularization to prevent
overfitting.
• In general, creating and training an AI model involves a mix of expertise in the relevant
field, familiarity with machine learning algorithms and techniques, and an intention to
experiment and repeat to enhance the model's performance.
Semantic, statistical, and hybrid models represent different approaches within the field of
Artificial Intelligence (AI) for processing and understanding information.
1. Semantic Models:
o Focus: Semantic models emphasize the meaning and interpretation of data,
aiming to understand the context and relationships between entities.
o Key Techniques:
§ Semantic Web Technologies: Use of ontologies, RDF (Resource
Description Framework), and SPARQL (Query Language for RDF) to
represent and query semantic information on the web.
§ Knowledge Graphs: Graph-based structures that capture relationships
between entities and their attributes, allowing for semantic querying.
§ Natural Language Understanding (NLU): Techniques that enable
8
machines to comprehend and extract meaning from human language.
2. Statistical Models:
o Focus: Statistical models rely on patterns and statistical analysis of data to make
predictions or decisions, often without explicitly understanding the semantics
of the data.
o Key Techniques:
§ Machine Learning Algorithms: Supervised learning (e.g., regression,
classification), unsupervised learning (e.g., clustering), and
reinforcement learning.
§ Feature Engineering: Selecting and transforming relevant features in
the data to improve the performance of statistical models.
§ Statistical Inference: Making predictions or drawing conclusions based
on statistical analysis of observed data.
3. Hybrid Models:
o Focus: Hybrid models combine elements of both semantic and statistical
approaches, aiming to leverage the strengths of each to improve overall
performance.
o Key Techniques:
§ Semantic-Statistical Integration: Integrating semantic knowledge
(e.g., ontologies, knowledge graphs) with statistical models to enhance
understanding and decision-making.
§ Rule-Based Systems: Incorporating explicit rules (semantic) alongside
machine learning models (statistical) to guide decision-making.
§ Transfer Learning: Pre-training models on semantic tasks and fine-
tuning them on specific statistical tasks to benefit from domain-specific
knowledge.
Common AI Models
There are several different AI models, and they all work a little bit differently. Some of the
most popular models you might find in an AI model library include:
The deep neural network is one of the most popular AI/ML models. The design for this deep
learning model was inspired by the human brain and its neural network. This AI model
uses layers of artificial neurons to combine multiple inputs and provide a single output value.
Hence the name, deep learning.
Deep neural networks have been used widely in mobile app development to provide image and
speech recognition services and natural language processing. Neural networks also help power
9
computer vision applications.
Linear Regression
This AI model is very popular with data scientists working in statistics. Linear regression is
based on a supervised learning model. These AI models are tasked with identifying the
relationship between input and output variables.
A linear regression model can predict the value of a dependent variable based on the value of
an independent variable. These models are used in linear discriminant analysis for several
industries, including healthcare, insurance, eCommerce, and banking.
Logistic Regression
This is another popular AI model, and it is closely related to the linear regression model.
However, the logistic regression model is different from the linear regression model because it
is only used to solve classification-based problems.
Logistic regression is the best AI model for solving a binary classification problem. This model
is adept at predicting the value or class of a dependent data point based on a set of independent
variables.
Decision Trees
This AI model is straightforward and also highly efficient. The decision tree uses available
data from past decisions to arrive at a conclusion. These trees often follow a basic if/then
pattern. For example, if you eat a sandwich at home, then you will not need to buy lunch.
Decision trees can be used to solve both regression and classification problems. In addition,
rudimentary decision trees powered the earliest forms of predictive analytics.
Random Forest
If one decision tree is a powerful AI model, how mighty is an entire forest? A random forest
is a collection of multiple decision trees.
Each decision tree returns its own result or decision, which is then merged with the results from
every other tree in the forest. Finally, the combined results make a more accurate final
prediction or decision.
The random forest is a great AI model when you have a large data set. This model is used for
solving both regression and classification problems. Modern predictive analytics are powered
in large part by random forest models.
10
Data Acquisition and Learning Aspect in AI
Data acquisition in AI refers to the process of collecting, obtaining, and preparing the data
that will be used to train, validate, and test machine learning models. It is a crucial step in
the development of AI systems because the quality and relevance of the data significantly
impact the performance and effectiveness of the models. The goal of data acquisition is to
gather a diverse and representative set of data that allows the AI model to learn patterns and
make accurate predictions or decisions.
1. Knowledge discovery
Data Mining: Analyzing large datasets to identify patterns, correlations, and valuable
insights.
Machine Learning: Utilizing algorithms that enable systems to learn from data and
improve over time without explicit programming.
2. Computational Learning Theory:
Focuses on understanding the nature of learning from a computational
perspective. Involves studying the capabilities and limitations of learning
algorithms.
3. Neural and Evolutionary Computation:
Deep Learning, Neural Networks: Mimic the workings of the human brain to
process data and identify patterns, using multiple layers of neural networks.
Evolutionary Algorithms: Problem-solving techniques inspired by principles of
natural evolution and genetics.
4. Intelligent Agents and Multi-Agent Systems:
Intelligent Agents: Programs designed to perform specific tasks autonomously
and adaptively. Multi-Agent Systems: Collections of multiple intelligent agents
that interact to solve complex problems collaboratively.
5. Multi-Perspective Integrated Intelligence:
Involves leveraging various AI methodologies and perspectives to address
complex problems. Integrating multiple AI techniques to gain a comprehensive
understanding and solve intricate challenges.
Problem Solving
Problem solving is a cognitive process that involves finding solutions to difficult or complex
issues. It is a fundamental skill used across various disciplines, professions, and everyday life.
Effective problem solving requires critical thinking, creativity, and a systematic approach.
Here's a general framework for problem solving:
• Clearly articulate the problem you are trying to solve. Understand the context, the
desired outcome, and any constraints or limitations.
11
2. Understand the Context:
• Gather relevant information about the problem. Consider the factors, variables, and
conditions that may influence or be influenced by the problem.
• Define the goals you want to achieve and the specific objectives you need to meet. This
provides clarity on what success looks like.
• Brainstorm and come up with a variety of possible solutions. Encourage creativity and
consider both conventional and unconventional ideas.
• Assess the potential solutions based on criteria such as feasibility, effectiveness, cost,
and impact. Prioritize and choose the most viable option.
• Develop a plan for implementing the selected solution. This may involve breaking the
solution into actionable steps and assigning responsibilities.
• Implement the solution and monitor its progress. Evaluate the outcomes and gather
feedback. If necessary, be prepared to adjust or refine the solution.
• Reflect on the problem-solving process. Consider what worked well, what could be
improved, and what lessons can be applied to future problem-solving situations.
12