Unit 2 AIML
Unit 2 AIML
Machine Learning is a subset of artificial intelligence(AI) that In traditional programming, rule-based code is written by the
focus on learning from data to develop an algorithm that can be developers depending on the problem statements
used to make a prediction.
Machine Learning uses a data-driven approach, It is typically Traditional programming is typically rule-based and
trained on historical data and then used to make predictions on deterministic. It hasn’t self-learning features like Machine
new data. Learning and AI.
ML can find patterns and insights in large datasets that might be Traditional programming is totally dependent on the
difficult for humans to discover. intelligence of developers. So, it has very limited capability.
Machine Learning is the subset of AI. And Now it is used in Traditional programming is often used to build applications and
various AI-based tasks like Chatbot Question answering, self- software systems that have specific functionality.
driven car., etc.
Machine Learning lifecycle:
▪ The lifecycle of a machine learning project involves a series of steps that
include:
1. Study the Problems: The first step is to study the problem. This step
involves understanding the business problem and defining the objectives
of the model.
2. Data Collection: When the problem is well-defined, we can collect the
relevant data required for the model. The data could come from various
sources such as databases, APIs, or web scraping.
3. Data Preparation: When our problem-related data is collected. then it is a
good idea to check the data properly and make it in the desired format so
that it can be used by the model to find the hidden patterns. This can be
done in the following steps:
Machine Learning lifecycle:
▪ Data cleaning
▪ Data Transformation
▪ Explanatory Data Analysis and Feature Engineering
▪ Split the dataset for training and testing.
4. Model Selection: The next step is to select the appropriate machine
learning algorithm that is suitable for our problem. This step requires
knowledge of the strengths and weaknesses of different algorithms.
Sometimes we use multiple models and compare their results and select
the best model as per our requirements.
Machine Learning lifecycle:
5. Model building and Training: After selecting the algorithm, we have to
build the model.
In the case of traditional machine learning building mode is easy it is just a
few hyperparameter tunings.
In the case of deep learning, we have to define layer-wise architecture
along with input and output size, number of nodes in each layer, loss
function, gradient descent optimizer, etc.
After that model is trained using the preprocessed dataset.
6. Model Evaluation: Once the model is trained, it can be evaluated on the
test dataset to determine its accuracy and performance.
▪ A classic example of a task that requires machine learning: It is very hard
to say what makes a 2
▪ Some more examples of tasks that are best solved by using a learning
algorithm
▪ Recognizing patterns:
▪ – Facial identities or facial expressions
▪ – Handwritten or spoken words
▪ – Medical images
▪ Generating patterns:
▪ Generating images or motion sequences
▪ Recognizing anomalies:
▪ – Unusual credit card transactions
▪ – Unusual patterns of sensor readings in a nuclear power plant
▪ Prediction:
▪ – Future stock prices or currency exchange rates
Introduction to AI
▪ Artificial Intelligence (AI) is a branch of computer science that
focuses on creating machines or systems capable of performing
tasks that typically require human intelligence. These tasks
include learning, reasoning, problem-solving, perception,
language understanding, and decision-making. The ultimate goal
of AI is to develop machines that can exhibit intelligence similar
to or even surpassing human intelligence.
Types of AI
▪ AI can be broadly categorized into two types:
▪ Narrow AI (or Weak AI)
Narrow AI is designed to perform a specific task or a
set of tasks, such as speech recognition, image recognition,
or playing chess
▪ General AI (or Strong AI)
▪ General AI, on the other hand, refers to machines with
the ability to understand, learn, and apply knowledge
across various domains, similar to human intelligence.
Components of AI includes
1. Machine Learning (ML): It is a subset of AI that involves the
development of algorithms and statistical models that enable computers
to improve their performance on a task through experience.
2. Deep Learning: This is a subfield of machine learning that involves
neural networks with multiple layers (deep neural networks). Deep
learning has proven to be highly effective in tasks such as image and
speech recognition, natural language processing, and more.
3. Natural Language Processing (NLP): NLP enables computers to
understand, interpret, and generate human language. It is crucial for
applications like chatbots, language translation, and sentiment analysis.
4. Computer Vision: This field focuses on enabling machines to interpret
and understand visual information from the world, such as images and
videos. Applications include facial recognition, object detection, and
autonomous vehicles.
5. Robotics: Integrating AI with robotics allows machines to interact with
the physical world, perform tasks, and make decisions based on sensory
input.
6. Expert Systems: These are computer systems designed to mimic the
AI/ML
▪ Machine learning is making great strides
▪ Large, good data sets
▪ Compute power
▪ Progress in algorithms
▪ Many interesting applications
▪ commericial
▪ scientific
▪ Links with artificial intelligence
▪ However, AI machine learning
Machine Learning Tasks
▪ Supervised learning
▪ regression: predict numerical values
▪ classification: predict categorical values, i.e., labels
▪ Unsupervised learning
▪ clustering: group data according to "distance"
▪ association: find frequent co-occurrences
▪ link prediction: discover relationships in data
▪ Reinforcement learning
Machine Learning
Algorithms
▪ Regression:
Ridge regression, Support Vector Machines, Random Forest,
Multilayer Neural Networks, Deep Neural Networks, ...
▪ Classification:
Naive Base, , Support Vector Machines,
Random Forest, Multilayer Neural Networks,
Deep Neural Networks, ...
▪ Clustering:
k-Means, Hierarchical Clustering, ...
Issues
▪ Many machine learning/AI projects fail
(Gartner claims 85 %)
Job Roles
● Machine Learning Engineer
● Data scientist
● Robotics scientist
● Research
● NLP Engineer
● Computer Vision Engineer.