0% found this document useful (0 votes)
29 views33 pages

UNIT-1-Intro of ML

Uploaded by

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

UNIT-1-Intro of ML

Uploaded by

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

Introduction of Machine

learning
Unit-1
What is Human Learning?
• Human learning is a natural process that occurs throughout our lives.
It involves acquiring new knowledge, skills, and behaviors through
experience, observation, and instruction. Unlike machines, humans
have the ability to reason, think critically, and adapt their knowledge
to different contexts
Real Life scenario
• Have you ever shopped online? So while checking for a product, did
you noticed when it recommends for a product similar to what you
are looking for? or did you noticed “the person bought this product
also bought this” combination of products. How are they doing this
recommendation? This is machine learning.
……Another

• Did you ever get a call from any bank or finance company asking you
to take a loan or an insurance policy?
• What do you think, do they call everyone? No, they call only a few
selected customers who they think will purchase their product. How
do they select? This is target marketing and can be applied using
Clustering. This is machine learning.
What is Machine Learning?

• Machine Learning is a subset of artificial intelligence which focuses


mainly on machine learning from their experience and making
predictions based on its experience.
What does it do?
• It enables the computers or the machines to make data-driven
decisions rather than being explicitly programmed for carrying out a
certain task.

• These programs or algorithms are designed in a way that they learn


and improve over time when are exposed to new data.
How does Machine Learning Work?

• Machine Learning algorithm is trained using a training data set to


create a model. When new input data is introduced to the ML
algorithm, it makes a prediction on the basis of the model.
• The prediction is evaluated for accuracy and if the accuracy is
acceptable, the Machine Learning algorithm is deployed. If the
accuracy is not acceptable, the Machine Learning algorithm is trained
again and again with an augmented training data set.
• This is just a very high-level example as there are many factors and
other steps involved.
Types of Machine Learning

• Supervised Learning – Train Me

• Unsupervised Learning – I am self sufficient in learning

• Reinforcement Learning – My life My rules! (Hit & Trial)


What is Supervised Learning?

• Supervised Learning is the one, where you can consider the learning
is guided by a teacher. We have a dataset which acts as a teacher and
its role is to train the model or the machine. Once the model gets
trained it can start making a prediction or decision when new data is
given to it.
Another definition of Supervised
• This algorithm consist of a target / outcome variable (or dependent
variable) which is to be predicted from a given set of predictors
(independent variables). Using these set of variables, we generate a
function that map inputs to desired outputs. The training process
continues until the model achieves a desired level of accuracy on the
training data. Examples of Supervised Learning: Regression, Decision
Tree, Random Forest, KNN, Logistic Regression etc.
What is Unsupervised Learning?

• The model learns through observation and finds structures in the data.
Once the model is given a dataset, it automatically finds patterns and
relationships in the dataset by creating clusters in it.
• What it cannot do is add labels to the cluster, like it cannot say this a group
of apples or mangoes, but it will separate all the apples from mangoes.
• Examples….
• Suppose we presented images of apples, bananas and mangoes to the
model, so what it does, based on some patterns and relationships it creates
clusters and divides the dataset into those clusters.
• Now if a new data is fed to the model, it adds it to one of the created
clusters.
Unsupervised Learning

• In this algorithm, we do not have any target or outcome variable to


predict / estimate. It is used for clustering population in different
groups, which is widely used for segmenting customers in different
groups for specific intervention. Examples of Unsupervised Learning:
Apriori algorithm, K-means.
What is Reinforcement Learning?

• It is the ability of an agent to interact with the environment and find


out what is the best outcome.
• It follows the concept of hit and trial method. The agent is rewarded
or penalized with a point for a correct or a wrong answer, and on the
basis of the positive reward points gained the model trains itself.
• And again once trained it gets ready to predict the new data
presented to it.
Reinforcement
• Using this algorithm, the machine is trained to make specific
decisions.
• It works this way: the machine is exposed to an environment where it
trains itself continually using trial and error. This machine learns from
past experience and tries to capture the best possible knowledge to
make accurate business decisions. Example of Reinforcement
Learning: Markov Decision Process
Machine Learning VS Human Learning:

ML Works in the following aspects.


•data,
•association,
•equations,
•Predictions
•Decision Tree
•Memory

Human learning is also kind of similar but also different when it comes to emotions and
memories.

•data,
•association,
•equations and
•emotions
•Short memory
•Long-term memory
Advantages of Machine learning
1. Easily identifies trends and patterns

Machine Learning can review large volumes of data and discover specific trends and patterns that would not
be apparent to humans. For instance, for an e-commerce website like Amazon, it serves to understand the
browsing behaviors and purchase histories of its users to help cater to the right products, deals, and
reminders relevant to them. It uses the results to reveal relevant advertisements to them

2. No human intervention needed (automation)

With ML, you don’t need to babysit your project every step of the way. Since it means giving machines the
ability to learn, it lets them make predictions and also improve the algorithms on their own. A common
example of this is anti-virus software's ; they learn to filter new threats as they are recognized. ML is also
good at recognizing spam.

3. Continuous Improvement

As ML algorithms gain experience, they keep improving in accuracy and efficiency. This lets them make
better decisions. Say you need to make a weather forecast model. As the amount of data you have keeps
growing, your algorithms learn to make more accurate predictions faster.
4. Handling multi-dimensional and multi-variety data

Machine Learning algorithms are good at handling data that are multi-dimensional and multi-variety,
and they can do this in dynamic or uncertain environments.

5. Wide Applications

You could be an e-tailer or a healthcare provider and make ML work for you. Where it does apply, it
holds the capability to help deliver a much more personal experience to customers while also
targeting the right customers.
Disadvantages of Machine Learning

1.Data Acquisition

Machine Learning requires massive data sets to train on, and these should be inclusive/unbiased, and
of good quality. There can also be times where they must wait for new data to be generated.

2. Time and Resources

ML needs enough time to let the algorithms learn and develop enough to fulfill their purpose with a
considerable amount of accuracy and relevancy. It also needs massive resources to function. This can
mean additional requirements of computer power for you, similar to how you might need additional
help if you decide to pay someone to write my college essay.

3. Interpretation of Results

Another major challenge is the ability to accurately interpret results generated by the algorithms. You
must also carefully choose the algorithms for your purpose.
4. High error-susceptibility

Machine Learning is autonomous but highly susceptible to errors. Suppose you train an algorithm
with data sets small enough to not be inclusive. You end up with biased predictions coming from a
biased training set. This leads to irrelevant advertisements being displayed to customers. In the
case of ML, such blunders can set off a chain of errors that can go undetected for long periods of
time. And when they do get noticed, it takes quite some time to recognize the source of the issue,
and even longer to correct it.
Common Issues in Machine Learning
As the field of machine learning continues to advance, it has become increasingly evident that its
widespread adoption is not without its share of challenges. These challenges, often referred to as the
common issues in machine learning, encompass a range of complex and interconnected problems that
researchers, practitioners, and policymakers must grapple with.
1.Poor Quality of Data

1.Incomplete Data: Poor data quality often stems from incomplete datasets, where crucial
information is missing or not collected uniformly. This can hinder the training process and lead to
inaccurate models, as the algorithms might struggle to grasp the underlying patterns due to
insufficient information.

2.Noisy Data: Noise in data refers to irrelevant or erroneous information that can mislead machine
learning algorithms. Noisy data can arise from various sources, such as sensor errors or human
input mistakes. Algorithms trained on noisy data might learn from these errors rather than the
actual patterns, resulting in suboptimal performance.
2.Underfitting of Training Data

1.Insufficient Model Complexity: Underfitting occurs when the chosen machine learning model is too
simplistic to capture the underlying patterns in the data. If the model is too basic, it might struggle to
learn the complexities of the dataset, resulting in poor performance both on the training and
validation/test datasets.

2.Limited Training Iterations: Inadequate training iterations or epochs can prevent the model from
fully converging to a suitable solution. If the model stops learning too early, it might not have refined
its internal parameters enough to make accurate predictions, leading to underfitting.

3.Overfitting of Training Data

1.Complex Model: Overfitting occurs when a machine learning model is excessively complex, fitting
not only the underlying patterns in the data but also the noise and randomness present in the training
dataset. This can lead to a model that performs exceptionally well on the training data but fails to
generalize to new, unseen data.
2.Limited Data: When the training dataset is small, complex models can effectively memorize the training
examples rather than learn the actual patterns. As a result, they struggle to make accurate predictions on
new data. This phenomenon is particularly pronounced in situations where the model has more
parameters than there are data points to constrain them effectively.

4.Machine Learning is a Complex Process


1.Algorithm Selection: Choosing the appropriate machine learning algorithm for a specific task is a
complex decision. Different algorithms have distinct strengths and weaknesses, and selecting the right
one requires a deep understanding of their characteristics and the problem at hand.

2.Hyperparameter Tuning: Each machine learning algorithm has hyperparameters that need to be set
before training. Finding the optimal combination of hyperparameters can be challenging and often
involves iterative experimentation and validation to achieve the best model performance.

5. Lack of Training Data

1.Limited Representativeness: Insufficient training data may lead to models that fail to capture the
true diversity and complexity of real-world scenarios. A small or unrepresentative dataset can result in
biased or inaccurate predictions when the model encounters new, diverse examples.

2.Reduced Generalization: Inadequate training data can hinder a model's ability to generalize well
beyond the data it was trained on. Without exposure to a wide range of instances, the model might
struggle to identify underlying patterns and make accurate predictions in various contexts.
6.Slow Implementation

1.Resource Intensive Algorithms: Some machine learning algorithms are computationally demanding,
requiring significant processing power and memory. Implementing such algorithms can lead to slow
training and inference times, making them less practical for real-time or large-scale applications.

2.Complex Model Architectures: Deep learning models, with their intricate architectures, can be slow
to train and deploy due to the vast number of parameters involved. The complexity of these models
often necessitates specialized hardware or distributed computing setups, which can contribute to
slower implementation times.
Applications of Machine learning

Machine learning is a buzzword for today's technology, and it is growing very rapidly day by day. We
are using machine learning in our daily life even without knowing it such as Google Maps, Google
assistant, Alexa, etc. Below are some most trending real-world 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:
•Real Time location of the vehicle form Google Map app and sensors
•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:
•Content Filter
•Header filter
•General blacklists filter
•Rules-based filters
•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.

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.

You might also like