0% found this document useful (0 votes)
239 views

Chapter 01 Notes

Samsung SIC course ai chapter 1 lecture notes

Uploaded by

logify99
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
239 views

Chapter 01 Notes

Samsung SIC course ai chapter 1 lecture notes

Uploaded by

logify99
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Chapter 01: Introduction to Artificial Intelligence

Artificial Intelligence
‣ Artificial intelligence (AI) is the ability of a computer program or a machine to think and
learn. It is also a field of study that tries to make computers "smart." They work on their
own without being encoded with commands. John McCarthy came up with the name
"artificial intelligence" in 1955.
‣ These processes include learning (the acquisition of information and rules for using the
information), reasoning (using rules to reach approximate or definite conclusions), and
self-correction.
Types of AI
AI can be categorized as either weak or strong. Weak AI, also known as narrow AI, is an AI
system that is designed and trained for a particular task. Virtual personal assistants, such as
Apple's Siri, are a form of weak AI. Strong AI, also known as artificial general intelligence, is an
AI system with generalized human cognitive abilities. When presented with an unfamiliar task,
a strong AI system is able to find a solution without human intervention.

Subsets of Artificial Intelligence


Artificial Intelligence: Any technique that enables computers to mimic human behavior
Machine Learning: A subset of AI techniques that use statistical methods to enable machines to
improve through experiences
Deep Learning: A subset of ML that makes the computation of multi-layer neural networks
feasible

Machine learning is a field of artificial intelligence and the study of computer algorithms that
automatically improve through examples and experiences.
‣ “A field of research that develops algorithms that allow machines to learn from
data and execute actions that are not explicitly specified by code“ - Arthur
Samuel, 1959
‣ “A computer program is said to learn from experience E with respect to some
class of tasks T and performance measure P if its performance at tasks in T, as
measured by P, improved with experience E.“ - Tom Mitchell, 1977
Example: Spam filter is one of the machine learning programs that use samples of spam and
general mails to classify mails that are designated as spam by the user.
Basic terms
‣ Training set: samples used by the system for learning
‣ Training instance (or sample: each training data,
‣ Task T classifies if the new mail is spam
‣ Experience E is the training data
‣ Performance measure P should be directly defined by the user, and performance
measure is also called accuracy which is often used for classification tasks.
Example: The task T is to classify dogs and cats, and the performance P represents a measure of
classifying dogs and cats. E can be said to be “learning” if the performance of classifying dogs
and cats gradually improves through experience, or data (10,000 photos).

Machine Learning vs. Deep Learning

IMA FEATU MACHINE WHAT THE


LEARNI

In standard machine learning methodology, a user prepares for training data set and extracts
relevant features such as edges and corners to train the model.
Then, the model references the features to classify new objects. This is an example of object
recognition and how computers distinguish cats and dogs with a significant level of accuracy.
Deep Learning
Workflow

Neural networks were initially


inspired
by the brain, but the details of
how they work are almost

On the other hand, in deep learning, a user does not need to extract features to feed images
into the model, and rather inputs images themselves directly into the deep learning model.
Deep learning model basically consist of ARTIFICIAL NEURAL NETWORK algorithm which learns
by itself to predict the object. Deep learning is a subtype of machine learning and usually more
complex than machine learning techniques. The key difference between machine learning and
deep learning is whether the model uses ARTIFICIAL NEURAL NETWORK or not.

Types of Machine Learning-based Data Analysis


There can be many different criteria to classify machine-learning based data analysis method
depending on different perspectives, but in general, it is classified into supervised learning and
unsupervised learning depending on the presence of objective variables (or response variables,
output target value), and it is also further classified into reinforced learning and semi-
supervised learning, etc.
Prediction Clustering: Comparing the properties of
the data and forming clusters based on
Making a model based on a given similar characteristics
data, then applying the model to
new cases for predictions
Predicting the quality specifications Clusterization of processes
from ingredients and environment with similar characteristics out
(pressure, temperature, humidity, of various processes
etc.) in the fishing industry Data
Mining
Association Rule
Classification
Identifying the attributes or
Determining where a particular relationships between items to which
case belongs in a given series of the appearance of a pattern implies
classified categories the appearance of another pattern

Quality Ratings from Predicting what will happen to the


good/normal/bad, Determining the entire process when there is an
quality of new products abnormal pattern in one process

In supervised learning, the machine is trained on a set of labeled data, which means that the
input data is paired with the desired output. The machine then learns to predict the output for
new input data. Supervised learning is often used for tasks such as classification, regression,
and object detection.
Key Points:

• Supervised learning involves training a machine from labeled data.


• Labeled data consists of examples with the correct answer or classification.
• The machine learns the relationship between inputs (fruit images) and outputs (fruit
labels).
• The trained machine can then make predictions on new, unlabeled data.
Regression
Regression is a type of supervised learning that is used to predict continuous values, such as
house prices, stock prices, or customer churn. Regression algorithms learn a function that maps
from the input features to the output value.
Classification
Classification is a type of supervised learning that is used to predict categorical values, such as
whether a customer will churn or not, whether an email is spam or not, or whether a medical
image shows a tumor or not. Classification algorithms learn a function that maps from the input
features to a probability distribution over the output classes.
Applications of Supervised learning
Supervised learning can be used to solve a wide variety of problems, including:
Spam filtering: Supervised learning algorithms can be trained to identify and classify spam
emails based on their content, helping users avoid unwanted messages.
Image classification: Supervised learning can automatically classify images into different
categories, such as animals, objects, or scenes, facilitating tasks like image search, content
moderation, and image-based product recommendations.
Medical diagnosis: Supervised learning can assist in medical diagnosis by analyzing patient data,
such as medical images, test results, and patient history, to identify patterns that suggest
specific diseases or conditions.
Fraud detection: Supervised learning models can analyze financial transactions and identify
patterns that indicate fraudulent activity, helping financial institutions prevent fraud and
protect their customers.
Natural language processing (NLP): Supervised learning plays a crucial role in NLP tasks,
including sentiment analysis, machine translation, and text summarization, enabling machines
to understand and process human language effectively.
Advantages of Supervised learning

• Supervised learning allows collecting data and produces data output from previous
experiences.
• Helps to optimize performance criteria with the help of experience.
• Supervised machine learning helps to solve various types of real-world computation
problems.
• It performs classification and regression tasks.
• It allows estimating or mapping the result to a new sample.
• We have complete control over choosing the number of classes we want in the training
data.
• Disadvantages of Supervised learning
• Classifying big data can be challenging.
• Training for supervised learning needs a lot of computation time. So, it requires a lot of
time.
• Supervised learning cannot handle all complex tasks in Machine Learning.
• Computation time is vast for supervised learning.
• It requires a labelled data set.
• It requires a training process.
In unsupervised learning, the machine is trained on a set of unlabeled data, which means that
the input data is not paired with the desired output. The machine then learns to find patterns
and relationships in the data. Unsupervised learning is often used for tasks such as clustering,
dimensionality reduction, and anomaly detection.

Key Points

• Unsupervised learning allows the model to discover patterns and relationships in


unlabeled data.
• Clustering algorithms group similar data points together based on their inherent
characteristics.
• Feature extraction captures essential information from the data, enabling the model to
make meaningful distinctions.
• Label association assigns categories to the clusters based on the extracted patterns and
characteristics.
Example
Imagine you have a machine learning model trained on a large dataset of unlabeled images,
containing both dogs and cats. The model has never seen an image of a dog or cat before, and it
has no pre-existing labels or categories for these animals. Your task is to use unsupervised
learning to identify the dogs and cats in a new, unseen image.
For instance, suppose it is given an image having both dogs and cats which it has never seen.
Thus the machine has no idea about the features of dogs and cats so we can’t categorize it as
‘dogs and cats ‘. But it can categorize them according to their similarities, patterns, and
differences, i.e., we can easily categorize the above picture into two parts. The first may contain
all pics having dogs in them and the second part may contain all pics having cats in them. Here
you didn’t learn anything before, which means no training data or examples.
It allows the model to work on its own to discover patterns and information that was previously
undetected. It mainly deals with unlabelled data.
Types of Unsupervised Learning
Unsupervised learning is classified into two categories of algorithms:
Clustering: A clustering problem is where you want to discover the inherent groupings in the
data, such as grouping customers by purchasing behavior.
Association: An association rule learning problem is where you want to discover rules that
describe large portions of your data, such as people that buy X also tend to buy Y.
Clustering is a type of unsupervised learning that is used to group similar data points
together. Clustering algorithms work by iteratively moving data points closer to their cluster
centers and further away from data points in other clusters.
Association rule learning is a type of unsupervised learning that is used to identify patterns in a
data. Association rule learning algorithms work by finding relationships between different items
in a dataset.
Application of Unsupervised learning
Non-supervised learning can be used to solve a wide variety of problems, including:

• Anomaly detection: Unsupervised learning can identify unusual patterns or deviations


from normal behavior in data, enabling the detection of fraud, intrusion, or system
failures.
• Scientific discovery: Unsupervised learning can uncover hidden relationships and
patterns in scientific data, leading to new hypotheses and insights in various scientific
fields.
• Recommendation systems: Unsupervised learning can identify patterns and similarities
in user behavior and preferences to recommend products, movies, or music that align
with their interests.
• Customer segmentation: Unsupervised learning can identify groups of customers with
similar characteristics, allowing businesses to target marketing campaigns and improve
customer service more effectively.
• Image analysis: Unsupervised learning can group images based on their content,
facilitating tasks such as image classification, object detection, and image retrieval.
Advantages of Unsupervised learning

• It does not require training data to be labeled.


• Dimensionality reduction can be easily accomplished using unsupervised learning.
• Capable of finding previously unknown patterns in data.
• Unsupervised learning can help you gain insights from unlabeled data that you might
not have been able to get otherwise.
• Unsupervised learning is good at finding patterns and relationships in data without
being told what to look for. This can help you learn new things about your data.
• Disadvantages of Unsupervised learning
• Difficult to measure accuracy or effectiveness due to lack of predefined answers during
training.
• The results often have lesser accuracy.
• The user needs to spend time interpreting and label the classes which follow that
classification.
• Unsupervised learning can be sensitive to data quality, including missing values, outliers,
and noisy data.
• Without labeled data, it can be difficult to evaluate the performance of unsupervised
learning models, making it challenging to assess their effectiveness.

Limitations of Machine Learning


• Insufficient Training Data
‣ Most machine learning algorithms require a lot of data to work well.
‣ Even in simple problems, thousands of data are needed, and millions of
complex problems such as image or voice recognition may be needed (In the
case you cannot reuse a model that has already been made).
‣ Since collecting additional training data is not always easy or cheap, the
algorithm cannot yet be ignored.

• Training Data Without Representation


‣ Sampling Noise: Coincidental data without representation by chance
‣ Sampling Bias: Very large samples are not representative when the sampling method
is wrong

• Poor Quality Data


‣ When the training data is full of errors, outliers, and noise, the machine learning
system will not work well because it is difficult to find the inherent patterns.
‣ When cleaning is needed: If it is clear that some samples are outliers, it is better to
ignore or fix them.

• Irrelevant Features
‣ The system can only learn when the features and those related to the training
data are sufficient.
‣ A vital element of a successful machine learning project is finding good features
to use for training, known as feature engineering.
‣ Feature selection: Choose the most useful feature for training
‣ Feature extraction: Combining features creates a more useful feature (dimension
reduction)
Underfitting and Overfitting
When we talk about the Machine Learning model, we actually talk about how well it performs
and its accuracy which is known as prediction errors. Let us consider that we are designing a
machine learning model. A model is said to be a good machine learning model if it generalizes
any new input data from the problem domain in a proper way. This helps us to make
predictions about future data, that the data model has never seen. Now, suppose we want to
check how well our machine learning model learns and generalizes to the new data. For that,
we have overfitting and underfitting, which are majorly responsible for the poor performances
of the machine learning algorithms.

Underfitting in Machine Learning


A statistical model or a machine learning algorithm is said to have underfitting when a model is
too simple to capture data complexities. It represents the inability of the model to learn the
training data effectively result in poor performance both on the training and testing data. In
simple terms, an underfit model’s are inaccurate, especially when applied to new, unseen
examples. It mainly happens when we uses very simple model with overly simplified
assumptions. To address underfitting problem of the model, we need to use more complex
models, with enhanced feature representation, and less regularization.
Reasons for Underfitting
‣ The model is too simple, So it may be not capable to represent the complexities in the
data.
‣ The input features which is used to train the model is not the adequate representations
of underlying factors influencing the target variable.
‣ The size of the training dataset used is not enough.
‣ Excessive regularization are used to prevent the overfitting, which constraint the model
to capture the data well.
‣ Features are not scaled.
Overfitting in Machine Learning
A statistical model is said to be overfitted when the model does not make accurate predictions
on testing data. When a model gets trained with so much data, it starts learning from the noise
and inaccurate data entries in our data set. And when testing with test data results in High
variance. Then the model does not categorize the data correctly, because of too many details
and noise. The causes of overfitting are the non-parametric and non-linear methods because
these types of machine learning algorithms have more freedom in building the model based on
the dataset and therefore, they can really build unrealistic models. A solution to avoid
overfitting is using a linear algorithm if we have linear data or using the parameters like the
maximal depth if we are using decision trees.
In a nutshell, Overfitting is a problem where the evaluation of machine learning algorithms on
training data is different from unseen data.
Reasons for Overfitting:
High variance and low bias.
The model is too complex.
The size of the training data.
Good Fit in a Statistical Model
Ideally, the case when the model makes the predictions with 0 error, is said to have a good fit
on the data. This situation is achievable at a spot between overfitting and underfitting. In order
to understand it, we will have to look at the performance of our model with the passage of
time, while it is learning from the training dataset.
With the passage of time, our model will keep on learning, and thus the error for the model on
the training and testing data will keep on decreasing. If it will learn for too long, the model will
become more prone to overfitting due to the presence of noise and less useful details. Hence
the performance of our model will decrease. In order to get a good fit, we will stop at a point
just before where the error starts increasing. At this point, the model is said to have good skills
in training datasets as well as our unseen testing dataset.
Applications of AI
‣ Image Classification: Automatically classify product images by analyzing them on the
production line.
‣ Semantic Segmentation: Scan the brain to diagnose tumors.
‣ Text Classification (Natural Language Processing): Automatically classify news articles.
‣ Text Classification: Automatically distinguish negative comments in the discussion
forum.
‣ Text Summary: Automatically summarize a long document.
‣ Understanding Natural Language: Make a chatbot or a personal secretary.
‣ Regression Analysis: Predict the company’s revenue for next year.
‣ Voice Recognition: The app responds to voice commands.
‣ Outlier Detection: Detect fraudulent credit card transactions.
‣ Cluster Work: Divide customers based on purchase history and plan different marketing
strategies for each set.
‣ Data Visualization: Express a complex dataset in a clear and meaningful graph.
‣ Recommendation System: Recommend products a customer may be interested in based
on purchase history.
‣ Reinforcement Learning: Make intelligent game bots.

You might also like