0% found this document useful (0 votes)
5 views13 pages

Unit-I Machine Leaning Notes

Machine learning (ML) is a subset of artificial intelligence (AI) that enables systems to learn from data and improve performance. It is categorized into three types: supervised, unsupervised, and reinforcement learning, each with distinct methodologies and applications. ML is widely used in various sectors, including healthcare, finance, and technology, for tasks such as image recognition, speech recognition, and fraud detection.

Uploaded by

johnthedon1729
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views13 pages

Unit-I Machine Leaning Notes

Machine learning (ML) is a subset of artificial intelligence (AI) that enables systems to learn from data and improve performance. It is categorized into three types: supervised, unsupervised, and reinforcement learning, each with distinct methodologies and applications. ML is widely used in various sectors, including healthcare, finance, and technology, for tasks such as image recognition, speech recognition, and fraud detection.

Uploaded by

johnthedon1729
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Unit-1

Introduction to Machine Learning


Machine learning (ML) is a subdomain of artificial intelligence (AI) that focuses on
developing systems that learn—or improve performance—based on the data they ingest.
Artificial intelligence is a broad word that refers to systems or machines that resemble human
intelligence. A crucial distinction is that, while all machine learning is AI, not all AI is
machine learning. We mainly use machine learning to achieve AI.

Introduction: Getting Started with Machine Learning, Learning,


Machine Learning (ML) represents a branch of artificial intelligence (AI) focused on enabling
systems to learn from data, uncover patterns, and autonomously make decisions. In today’s era
dominated by data, ML is transforming industries ranging from healthcare to finance, offering
robust tools for predictive analytics, automation, and informed decision-making.
A computer program is said to learn from experience E concerning some class of tasks T and
performance measure P, if its performance at tasks T, as measured by P, improves with
experience E.

Examples
 Handwriting recognition learning problem
o Task T : Recognizing and classifying handwritten words within images
o Performance P : Percent of words correctly classified
o Training experience E : A dataset of handwritten words with given
classifications
 A robot driving learning problem
o Task T : Driving on highways using vision sensors
o Performance P : Average distance traveled before an error
o Training experience E : A sequence of images and steering commands
recorded while observing a human driver

Following are some key points which show the importance of Machine Learning:

o Rapid increment in the production of data


o Solving complex problems, which are difficult for a human
o Decision making in various sector including finance
o Finding hidden patterns and extracting useful information from data.

Features of Machine Learning:

o Machine learning uses data to detect various patterns in a given dataset.


o It can learn from past data and improve automatically.
o It is a data-driven technology.
o Machine learning is much similar to data mining as it also deals with the huge amount of
the data.

Type of machine learning


At a broad level, machine learning can be classified into three types:

1. Supervised learning
2. Unsupervised learning
3. Reinforcement learning

1) Supervised Learning
In supervised learning, sample labeled data are provided to the machine learning system for
training, and the system then predicts the output based on the training data.

The system uses labeled data to build a model that understands the datasets and learns about each
one. After the training and processing are done, we test the model with sample data to see if it
can accurately predict the output.

The mapping of the input data to the output data is the objective of supervised learning. The
managed learning depends on oversight, and it is equivalent to when an understudy learns things
in the management of the educator. Spam filtering is an example of supervised learning.

Supervised learning can be grouped further in two categories of algorithms:


o Classification
o Regression

2) Unsupervised Learning
Unsupervised learning is a learning method in which a machine learns without any supervision.

The training is provided to the machine with the set of data that has not been labeled, classified,
or categorized, and the algorithm needs to act on that data without any supervision. The goal of
unsupervised learning is to restructure the input data into new features or a group of objects with
similar patterns.

Advertisement
In unsupervised learning, we don't have a predetermined result. The machine tries to find useful
insights from the huge amount of data. It can be further classifieds into two categories of
algorithms:

o Clustering
o Association

3) Reinforcement Learning
Reinforcement learning is a feedback-based learning method, in which a learning agent gets a
reward for each right action and gets a penalty for each wrong action. The agent learns
automatically with these feedbacks and improves its performance. In reinforcement learning, the
agent interacts with the environment and explores it. The goal of an agent is to get the most
reward points, and hence, it improves its performance.

The robotic dog, which automatically learns the movement of his arms, is an example of
Reinforcement learning.
Applications of Machine Learning:

1. Image Recognition:
Image recognition is one of the most common applications of machine learning. It is used to
identify objects, persons, places, digital images, etc. The popular use case of image recognition
and face detection is, Automatic friend tagging suggestion:

Facebook provides us a feature of auto friend tagging suggestion. Whenever we upload a photo
with our Facebook friends, then we automatically get a tagging suggestion with name, and the
technology behind this is machine learning's face detection and recognition algorithm.

It is based on the Facebook project named "Deep Face," which is responsible for face
recognition and person identification in the picture.

2. Speech Recognition
While using Google, we get an option of "Search by voice," it comes under speech recognition,
and it's a popular application of machine learning.

Speech recognition is a process of converting voice instructions into text, and it is also known as
"Speech to text", or "Computer speech recognition." At present, machine learning algorithms
are widely used by various applications of speech recognition. Google assistant, Siri, Cortana,
and Alexa are using speech recognition technology to follow the voice instructions.

3. Traffic prediction:
If we want to visit a new place, we take help of Google Maps, which shows us the correct path
with the shortest route and predicts the traffic conditions.
It predicts the traffic conditions such as whether traffic is cleared, slow-moving, or heavily
congested with the help of two ways:

o Real Time location of the vehicle form Google Map app and sensors
o Average time has taken on past days at the same time.
Everyone who is using Google Map is helping this app to make it better. It takes information
from the user and sends back to its database to improve the performance.

4. Product recommendations:
Machine learning is widely used by various e-commerce and entertainment companies such
as Amazon, Netflix, etc., for product recommendation to the user. Whenever we search for some
product on Amazon, then we started getting an advertisement for the same product while internet
surfing on the same browser and this is because of machine learning.

Google understands the user interest using various machine learning algorithms and suggests the
product as per customer interest.

As similar, when we use Netflix, we find some recommendations for entertainment series,
movies, etc., and this is also done with the help of machine learning.

5. Self-driving cars:
One of the most exciting applications of machine learning is self-driving cars. Machine learning
plays a significant role in self-driving cars. Tesla, the most popular car manufacturing company
is working on self-driving car. It is using unsupervised learning method to train the car models to
detect people and objects while driving.

6. Email Spam and Malware Filtering:


Whenever we receive a new email, it is filtered automatically as important, normal, and spam.
We always receive an important mail in our inbox with the important symbol and spam emails in
our spam box, and the technology behind this is Machine learning. Below are some spam filters
used by Gmail:

o Content Filter
o Header filter
o General blacklists filter
o Rules-based filters
o Permission filters
Some machine learning algorithms such as Multi-Layer Perceptron, Decision tree, and Naïve
Bayes classifier are used for email spam filtering and malware detection.

7. Virtual Personal Assistant:


We have various virtual personal assistants such as Google assistant, Alexa, Cortana, Siri. As
the name suggests, they help us in finding the information using our voice instruction. These
assistants can help us in various ways just by our voice instructions such as Play music, call
someone, Open an email, Scheduling an appointment, etc.

These virtual assistants use machine learning algorithms as an important part.

These assistant record our voice instructions, send it over the server on a cloud, and decode it
using ML algorithms and act accordingly.
8. Online Fraud Detection:
Machine learning is making our online transaction safe and secure by detecting fraud transaction.
Whenever we perform some online transaction, there may be various ways that a fraudulent
transaction can take place such as fake accounts, fake ids, and steal money in the middle of a
transaction. So to detect this, Feed Forward Neural network helps us by checking whether it is
a genuine transaction or a fraud transaction.

For each genuine transaction, the output is converted into some hash values, and these values
become the input for the next round. For each genuine transaction, there is a specific pattern
which gets change for the fraud transaction hence, it detects it and makes our online transactions
more secure.

9. Stock Market trading:


Machine learning is widely used in stock market trading. In the stock market, there is always a
risk of up and downs in shares, so for this machine learning's long short term memory neural
network is used for the prediction of stock market trends.

10. Medical Diagnosis:


In medical science, machine learning is used for diseases diagnoses. With this, medical
technology is growing very fast and able to build 3D models that can predict the exact position
of lesions in the brain.

It helps in finding brain tumors and other brain-related diseases easily.


11. Automatic Language Translation:
Nowadays, if we visit a new place and we are not aware of the language then it is not a problem
at all, as for this also machine learning helps us by converting the text into our known languages.
Google's GNMT (Google Neural Machine Translation) provide this feature, which is a Neural
Machine Learning that translates the text into our familiar language, and it called as automatic
translation.

The technology behind the automatic translation is a sequence to sequence learning algorithm,
which is used with image recognition and translates the text from one language to another
language.

Supervised vs Unsupervised Learning,

Supervised Learning Unsupervised Learning

Supervised learning algorithms are trained Unsupervised learning algorithms are trained
using labeled data. using unlabeled data.

Supervised learning model takes direct


Unsupervised learning model does not take any
feedback to check if it is predicting correct
feedback.
output or not.

Supervised learning model predicts the output. Unsupervised learning model finds the hidden
patterns in data.
In supervised learning, input data is provided to In unsupervised learning, only input data is
the model along with the output. provided to the model.

The goal of supervised learning is to train the The goal of unsupervised learning is to find the
model so that it can predict the output when it hidden patterns and useful insights from the
is given new data. unknown dataset.

Supervised learning needs supervision to train Unsupervised learning does not need any
the model. supervision to train the model.

Supervised learning can be categorized Unsupervised Learning can be classified


in Classification and Regression problems. in Clustering and Associations problems.

Supervised learning can be used for those cases Unsupervised learning can be used for those
where we know the input as well as cases where we have only input data and no
corresponding outputs. corresponding output data.

Unsupervised learning model may give less


Supervised learning model produces an
accurate result as compared to supervised
accurate result.
learning.

Supervised learning is not close to true Unsupervised learning is more close to the true
Artificial intelligence as in this, we first train Artificial Intelligence as it learns similarly as a
the model for each data, and then only it can child learns daily routine things by his
predict the correct output. experiences.

It includes various algorithms such as Linear


Regression, Logistic Regression, Support It includes various algorithms such as
Vector Machine, Multi-class Classification, Clustering, KNN, and Apriori algorithm.
Decision tree, Bayesian Logic, etc.

Python libraries suitable for Machine Learning,


Here’s a list of some of the best Python libraries for Machine Learning that streamline
development:
1. Numpy
NumPy is a very popular python library for large multi-dimensional array and matrix
processing, with the help of a large collection of high-level mathematical functions. It is very
useful for fundamental scientific computations in Machine Learning. It is particularly useful
for linear algebra, Fourier transform, and random number capabilities. High-end libraries like
TensorFlow uses NumPy internally for manipulation of Tensors.
import numpy as np

2. Pandas
Pandas is a popular Python library for data analysis. It is not directly related to Machine
Learning. As we know that the dataset must be prepared before training.
 In this case, Pandas comes handy as it was developed specifically for data extraction and
preparation.
 It provides high-level data structures and wide variety tools for data analysis. It provides
many inbuilt methods for grouping, combining and filtering data.

import pandas as pd

3. Matplotlib
Matplotlib is a very popular Python library for data visualization. Like Pandas, it is not directly
related to Machine Learning. It particularly comes in handy when a programmer wants to
visualize the patterns in the data. It is a 2D plotting library used for creating 2D graphs and
plots.
 A module named pyplot makes it easy for programmers for plotting as it provides features
to control line styles, font properties, formatting axes, etc.
 It provides various kinds of graphs and plots for data visualization, viz., histogram, error
charts, bar chats, etc,

import matplotlib.pyplot as plt

4. SciPy
SciPy is a very popular library among Machine Learning enthusiasts as it contains different
modules for optimization, linear algebra, integration and statistics. There is a difference
between the SciPy library and the SciPy stack. The SciPy is one of the core packages that make
up the SciPy stack. SciPy is also very useful for image manipulation.

5. Scikit-Learn
Scikit-learn is one of the most popular ML libraries for classical ML algorithms. It is built on
top of two basic Python libraries, viz., NumPy and SciPy. Scikit-learn supports most of the
supervised and unsupervised learning algorithms. Scikit-learn can also be used for data-mining
and data-analysis, which makes it a great tool who is starting out with ML.

6. TensorFlow
TensorFlow is a very popular open-source library for high performance numerical computation
developed by the Google Brain team in Google. As the name suggests, Tensorflow is a
framework that involves defining and running computations involving tensors. It can train and
run deep neural networks that can be used to develop several AI applications. TensorFlow is
widely used in the field of deep learning research and application.

7. Keras
Keras is a very popular Python Libaries for Machine Learning . It is a high-level neural
networks API capable of running on top of TensorFlow, CNTK, or Theano. It can run
seamlessly on both CPU and GPU. Keras makes it really for ML beginners to build and design
a Neural Network. One of the best thing about Keras is that it allows for easy and fast
Difference between Machine learning and Artificial Intelligence

S.No. ARTIFICIAL INTELLIGENCE MACHINE LEARNING

The terminology “Machine Learning” was


The terminology “Artificial Intelligence” was
first used in 1952 by IBM computer
1. originally used by John McCarthy in 1956, who
scientist Arthur Samuel, a pioneer in
also hosted the first AI conference.
artificial intelligence and computer games.

AI stands for Artificial intelligence, ML stands for Machine Learning which


2. where intelligence is defined as the ability to is defined as the acquisition of knowledge
acquire and apply knowledge. or skill

AI is the broader family consisting of ML and DL Machine Learning is the subset of Artificial
3.
as its components. Intelligence.

The aim is to increase the chance of success and The aim is to increase accuracy, but it does
4.
not accuracy. not care about; the success

AI is aiming to develop an intelligent system


Machine learning is attempting to construct
capable of
5. machines that can only accomplish the jobs
performing a variety of complex jobs. decision-
for which they have been trained.
making

It works as a computer program that does smart Here, the tasks systems machine takes data
6.
work. and learns from data.

The goal is to learn from data on certain


The goal is to simulate natural intelligence to
7. tasks to maximize the performance on that
solve complex problems.
task.

The scope of machine learning is


8. AI has a very broad variety of applications.
constrained.

ML allows systems to learn new things


9. AI is decision-making.
from data.

It is developing a system that mimics humans to It involves creating self-learning


10.
solve problems. algorithms.

AI is a broader family consisting of ML and DL as


11. ML is a subset of AI.
its components.
S.No. ARTIFICIAL INTELLIGENCE MACHINE LEARNING

Three broad categories of AI are : Three broad categories of ML are :


1. Artificial Narrow Intelligence (ANI) 1. Supervised Learning
12.
2. Artificial General Intelligence (AGI) 2. Unsupervised Learning
3. Artificial Super Intelligence (ASI) 3. Reinforcement Learning

AI can work with structured, semi-structured, and ML can work with only structured and
13.
unstructured data. semi-structured data.

The most common uses of machine


learning-
AI’s key uses include-
 Facebook’s automatic friend
 Siri, customer service via chatbots
suggestions
 Expert Systems
14.  Google’s search algorithms
 Machine Translation like Google Translate
 Banking fraud analysis
 Intelligent humanoid robots such as Sophia,
 Stock price forecast
and so on.
 Online recommender systems, and so
on.

AI refers to the broad field of creating machines


that can simulate human intelligence and perform ML is a subset of AI that involves training
15. tasks such as understanding natural language, algorithms on data to make predictions,
recognizing images and sounds, making decisions, decisions, and recommendations.
and solving complex problems.

AI is a broad concept that includes various


ML focuses on teaching machines how to
methods for creating intelligent machines,
learn from data without being explicitly
including rule-based systems, expert systems, and
16. programmed, using algorithms such as
machine learning algorithms. AI systems can be
neural networks, decision trees, and
programmed to follow specific rules, make logical
clustering.
inferences, or learn from data using ML.

In contrast, ML algorithms require large


AI systems can be built using
amounts of structured data to learn and
both structured and unstructured data, including
improve their performance. The quality and
text, images, video, and audio. AI algorithms can
17. quantity of the data used to train ML
work with data in a variety of formats, and they
algorithms are critical factors in
can analyze and process data to extract meaningful
determining the accuracy and effectiveness
insights.
of the system.

AI is a broader concept that encompasses many


ML, on the other hand, is primarily used
different applications, including robotics, natural
for pattern recognition, predictive
language processing, speech recognition,
18. modeling, and decision-making in fields
and autonomous vehicles. AI systems can be used
such as marketing, fraud detection, and
to solve complex problems in various fields, such
credit scoring.
as healthcare, finance, and transportation.
S.No. ARTIFICIAL INTELLIGENCE MACHINE LEARNING

In contrast, ML algorithms require human


AI systems can be designed to work autonomously
involvement to set up, train, and optimize
or with minimal human intervention, depending
the system. ML algorithms require the
19. on the complexity of the task. AI systems can
expertise of data scientists, engineers, and
make decisions and take actions based on the data
other professionals to design and
and rules provided to them.
implement the system.

You might also like