Machine Learning: Instructor: Prof. Ayesha
Machine Learning: Instructor: Prof. Ayesha
ARTIFICIAL + INTELLIGENCE
Made by human Ability to understand, think, learn
It is the study of how to make the computer to do the things which at present human
can do better.
Evolution during world war 2(1939-1945)
Purpose of first computer to break german communication.
In 1950 Alan Turing publish paper. Heading of this paper is CAN MACHINE
LEARN
CONTINUE…
EXAMPLE:
Smart phones
Smart cars
You tube
Person order pizza online
MACHINE
LEARNING
ARTIFICIAL
INTELLIGENCE
MACHINE LEARNING
data (Input)
TRADITIONAL
PROGRAMMING
output
Program
output
Adeeba Sadaqat
G3F18BSCS0062
Machine Learning Life cycle:
Machine learning has given the computer systems the abilities to automatically learn
without being explicitly programmed. But how does a machine learning system work? So,
it can be described using the life cycle of machine learning. Machine learning life cycle is
a cyclic process to build an efficient machine learning project. The main purpose of the life
cycle is to find a solution to the problem or project.
Machine learning life cycle involves seven major steps, which are given below:
Cont..
Gathering Data: Data Gathering is the first step of the machine learning life cycle. The
goal of this step is to identify and obtain all data-related problems.In this step, we need to
identify the different data sources, as data can be collected from various sources such
as files, database, internet, or mobile devices. It is one of the most important steps of the
life cycle. The quantity and quality of the collected data will determine the efficiency of
the output. The more will be the data, the more accurate will be the prediction.
This step includes the below tasks:
Identify various data sources
Collect data
Integrate the data obtained from different sources
Cont..
Data preparation: After collecting the data, we need to prepare it for further steps. Data
preparation is a step where we put our data into a suitable place and prepare it to use in our
machine learning training. In this step, first, we put all data together, and then randomize
the ordering of data. This step can be further divided into two processes:
Data exploration: It
is used to understand the nature of data that we have to work with. We
need to understand the characteristics, format, and quality of data.
A better understanding of data leads to an effective outcome. In this, we find Correlations,
general trends, and outliers.
Data pre-processing: Now the next step is preprocessing of data for its analysis.
Cont…
Data Wrangling: Data wrangling is the process of cleaning and converting raw data into a useable format. It is the process of
cleaning the data, selecting the variable to use, and transforming the data in a proper format to make it more suitable for analysis in
the next step. It is one of the most important steps of the complete process. Cleaning of data is required to address the quality issues.
It is not necessary that data we have collected is always of our use as some of the data may not be useful. In real-world applications,
collected data may have various issues, including:
• Missing Values
• Duplicate data
• Invalid data
• Noise
Data Analysis: Now the cleaned and prepared data is passed on to the analysis step. This step involves:
• Selection of analytical techniques
• Building models
• Review the result
The aim of this step is to build a machine learning model to analyze the data using various analytical techniques and review the
outcome. It starts with the determination of the type of the problems, where we select the machine learning techniques such
as Classification, Regression, Cluster analysis, Association, etc. then build the model using prepared data, and evaluate the model.
Cont…
Train Model: Now the next step is to train the model, in this step we train our model to improve
its performance for better outcome of the problem. We use datasets to train the model using
various machine learning algorithms. Training a model is required so that it can understand the
various patterns, rules, and, features.
Test Model: Once our machine learning model has been trained on a given dataset, then we test
the model. In this step, we check for the accuracy of our model by providing a test dataset to
it.Testing the model determines the percentage accuracy of the model as per the requirement of
project or problem.
Deployment: The last step of machine learning life cycle is deployment, where we deploy the
model in the real-world system.If the above-prepared model is producing an accurate result as
per our requirement with acceptable speed, then we deploy the model in the real system. But
before deploying the project, we will check whether it is improving its performance using
available data or not. The deployment phase is similar to making the final report for a project.
The Future Scope of Machine Learning: Top Use Cases
Gathering and preparing large volumes of data that the machine will use to teach itself.
Feeding the data into ML models and training them to make right decisions through supervision and correction.
Deploying the model to make analytical predictions or feed with new kinds of data to expand its capabilities.
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
Cont….
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
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.
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.
Cont….
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.
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.
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.
Cont….
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
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.
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.
Cont..
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.
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.
Sana Akram
G3F18BSCS0003
Advantages of Machine learning
Data Acquisition
Time and Resources
Interpretation of Results
High error-susceptibility
Applications:
This is the learning type that you will most likely encounter, as it is exhibited in many of the following
common applications:
•Advertisement Popularity:Selecting advertisements that will perform well is often a supervised learning
task.
•Spam Classification: If you use a modern email system, chances are you’ve encountered a spam filter. That
spam filter is a supervised learning system. Fed email examples and labels (spam/not spam), these systems
learn how to preemptively filter out malicious emails so that their user is not harassed by them. Many of
these also behave in such a way that a user can provide new labels to the system and it can learn user
preference.
•Face Recognition: Do you use Facebook? Most likely your face has been used in a supervised learning
algorithm that is trained to recognize your face. Having a system that takes a photo, finds faces, and guesses
who that is in the photo (suggesting a tag) is a supervised process. It has multiple layers to it, finding faces
and then identifying them, but is still supervised nonetheless.
Applications:
Some areas you might see unsupervised learning crop up are:
•Recommender Systems: If you’ve ever used YouTube or Netflix, you’ve most likely encountered a video
recommendation system. These systems are often times placed in the unsupervised domain. We know things
about videos, maybe their length, their genre, etc.
•Buying Habits: It is likely that your buying habits are contained in a database somewhere and that data is
being bought and sold actively at this time. These buying habits can be used in unsupervised learning
algorithms to group customers into similar purchasing segments. This helps companies market to these
grouped segments and can even resemble recommender systems.
•Grouping User Logs: Less user facing, but still very relevant, we can use unsupervised learning to group
user logs and issues. This can help companies identify central themes to issues their customers face and
rectify these issues, through improving a product or designing an FAQ to handle common issues
Applications
• Video Games: One of the most common places to look at reinforcement learning is in learning
to play games. Look at Google’s reinforcement learning application, AlphaZero and AlphaGo
which learned to play the game Go. Our Mario example is also a common example. Currently, I
don’t know any production-grade game that has a reinforcement learning agent deployed as its
game AI, but I can imagine that this will soon be an interesting option for game devs to employ.
• Industrial Simulation: For many robotic applications (think assembly lines), it is useful to have
our machines learn to complete their tasks without having to hardcode their processes. This can
be a cheaper and safer option; it can even be less prone to failure. We can also incentivize our
machines to use less electricity, so as to save us money. More than that, we can start this all
within a simulation so as to not waste money if we potentially break our machine.
• Resource Management: Reinforcement learning is good for navigating complex environments.
It can handle the need to balance certain requirements. Take, for example, Google’s data centers.
They used reinforcement learning to balance the need to satisfy our power requirements, but do
it as efficiently as possible, cutting major costs. How does this affect us and the average person?
Cheaper data storage costs for us as well and less of an impact on the environment we all share.