MACHINE LEARNING AND
ITS APPLICATIONS
SUBMITTED TO: SUBMITTED BY:
Er. SEEMA RANI Bhuvan Chopra
2316011
© 2019 BHU_FILES under AMBALA COLLEGE OF ENGINEERING AND APPLIED RESEARCH | All Rights Reserved
TABLE OF CONTENTS:
 MACHINE LEARNING(INTRODUCTION)
 DIFFERENCE
 BASIC PREREQUISITES
 TYPES
 APPLICATIONS
 EXAMPLE
© 2019 BHU_FILES under AMBALA COLLEGE OF ENGINEERING AND APPLIED RESEARCH | All Rights Reserved
WHAT IS MACHINE LEARNING?
 Machine Learning
Herbert Alexander Simon:
“Learning is any process by which a system improves
performance from experience.”
Turing Award 1975 and Nobel Prize in Economics 1978  Herbert Simon
“Machine Learning is concerned with computer programs that automatically
improve their performance through experience. “
© 2019 BHU_FILES | All Rights Reserved
MORE TO MACHINE LEARNING
• In basic terms, ML is the process of training a piece of software, called a model.
• to make useful predictions using a data set. This predictive model can then serve up
predictions about previously unseen data.
• We use these predictions to take action in a product;
• for example, the system predicts that a user will like a certain video, so the system
recommends that video to the user.
• DATASET EXAMPLES: https://mailchi.mp/start/q86rfojms6-358025?e=3c53d9959f
A BASIC HISTORY..
DIFFERENCE BETWEEN ARTIFICIAL INTELLIGENCE,
MACHINE LEARNING, AND DEEP LEARNING
• Artificial Intelligence
“The ability of machines to work and think, like the human brain, is
called Artificial Intelligence.”
AI thinks, work, and reacts similarly to humans as it is designed in that
way. However, Establishing the AI ultimately in our lives is not possible
until now because there are many features of the human brain which
are unable to describe. Some of the best examples of AI are face
recognition on Facebook and images classification service of Interest.
There are several cases of Artificial Intelligence, which we come
through every day.
PICTORIAL VIEW 
MACHINE LEARNING
• Machine learning is a part of Artificial Intelligence. Most of the people consider it as
Artificial Intelligence, but it's not true. The machines can learn. The robots learn
themselves from the data provided to them. It makes more like to be a technique
which makes us realize the presence of Artificial Intelligence. This technique uses
algorithms to get data, learn, and then analyze the data. The results came in the form
of predictions. You may have noticed when getting recommendation on shopping
sites, Google, or Facebook. You get suggestions according to your interests. It is
done with machine learning algorithms which are developed in the way to analyzing
the recent searches, history, and other information. This technique also influences
the marketing and banking sectors.
• “Machine learning is the tendency of machines to learn from data analysis and
achieve Artificial Intelligence.”
• New machine learning algorithms were limited to basic AI, but now it has
become an essential part of this system.
• Many complex algorithms are prepared to give better experience. It has
turned the way of watching Shows and Movies. The entertainment industry is
using this algorithm for providing suitable suggestions for its viewers on web
channels like Netflix and Amazon Prime.
• Machine learning is the concept of analyzing data and offers excellent
recommendations based on learning from those points if you have questioned
how the technique is implemented then read the next section that is Deep
learning.
COMPANIES USING MACHINE LEARNING 
DEEP LEARNING
 Deep learning is a subset of machine learning that's based on artificial neural networks.
The learning process is deep because the structure of artificial neural networks consists
of multiple input, output, and hidden layers. Each layer contains units that transform the
input data into information that the next layer can use for a certain predictive task.
Thanks to this structure, a machine can learn through its own data processing.
PREREQUISITES AND PREWORK
• Mastery of intro-level algebra. You should be comfortable with variables and coefficients,
linear equations, graphs of functions, and histograms. (Familiarity with more advanced math
concepts such as logarithms and derivatives is helpful, but not required.)
• Proficiency in programming basics, and some experience coding in Python, writing Python
code that contains basic programming constructs, such as function definitions/invocations, lists
and dicts, loops, and conditional expressions.
• Pandas: pandas is a column-oriented data analysis API. It's a great tool for handling and
analyzing input data, and many ML frameworks support pandas data structures as inputs.
Although a comprehensive introduction to the pandas API would span many pages, the core
concepts are fairly straightforward. For a more complete reference, the pandas docs site contains
extensive documentation and many tutorials.
© 2019 BHU_FILES under AMBALA COLLEGE OF ENGINEERING AND APPLIED RESEARCH | All Rights Reserved
Math
Algebra
•Variables, coefficients, and functions
•Linear equations such as y=b+w1x1+w2x2
•Logarithms, and logarithmic equations such as y=ln(1+ez)
•Sigmoid function
Linear algebra
•Tensor and tensor rank
•Matrix multiplication
Trigonometry
•Tanh (discussed as an activation function; no prior knowledge needed)
Statistics
•Mean, median, outliers, and standard deviation
•Ability to read a histogram
PYTHON PROGRAMMING
Basic Python
The following Python basics are covered in The Python Tutorial:
•Defining and calling functions, using positional and keyword parameters
•Dictionaries, lists, sets (creating, accessing, and iterating)
•for loops, for loops with multiple iterator variables (e.g., for a, b in [(1,2), (3,4)])
•if/else conditional blocks and conditional expressions
•String formatting (e.g., '%.2f' % 3.14)
•Variables, assignment, basic data types (int, float, bool, str)
•The pass statement
THIRD-PARTY PYTHON LIBRARIES
• Matplotlib (for data visualization)
• Seaborn (for heatmaps)
• pandas (for data manipulation)
• NumPy (for low-level math operations)
• scikit-learn (for evaluation metrics)
• Keras
• PyTorch
TRADITIONAL PROGRAMMING AND MACHINE LEARNING
• The above figure shows traditional programming and next is of machine learning:
TYPES OF MACHINE LEARNING
© 2019 BHU_FILES under AMBALA COLLEGE OF ENGINEERING AND APPLIED RESEARCH | All Rights Reserved
SUPERVISED LEARNING:
• machine learning takes data as input. lets call this data Training data.
• For example, suppose you are an amateur botanist determined to differentiate
between two species of the Lilliputian plant genus (a completely made-up plant).
The two species look pretty similar. Fortunately, a botanist has put together a data
set of Lilliputian plants she found in the wild along with their species name.
• Here's a snippet of that data set:
GOAL
• Leaf width and leaf length are the features (which is why the graph below labels
both of these dimensions as X), while the species is the label. A real life botanical
data set would probably contain far more features (including descriptions of
flowers, blooming times, arrangement of leaves) but still have only one label.
Features are measurements or descriptions; the label is essentially the "answer." For
example, the goal of the data set is to help other botanists answer the question,
"Which species is this plant?“
• In supervised machine learning, you feed the features and their corresponding
labels into an algorithm in a process called training. During training, the algorithm
gradually determines the relationship between features and their corresponding
labels. Often times in machine learning, the model is very complex. However,
suppose that this model can be represented as a line that separates big-leaf from
small-leaf:
© 2019 BHU_FILES under AMBALA COLLEGE OF ENGINEERING AND APPLIED RESEARCH | All Rights Reserved
GRAPH
FINAL GRAPH:
NUTSHELL
• To tie it all together, supervised machine learning finds patterns between data and
labels that can be expressed mathematically as functions. Given an input feature,
you are telling the system what the expected output label is, thus you are
supervising the training. The ML system will learn patterns on this labeled data. In
the future, the ML system will use these patterns to make predictions on data that it
did not see during training.
• An exciting real-world example of supervised learning is a study from Stanford
University that used a model to detect skin cancer in images.
Unsupervised Learning
• In unsupervised learning, the goal is to identify meaningful patterns in the data.To
accomplish this, the machine must learn from an unlabeled data set. In other
words, the model has no hints how to categorize each piece of data and must infer
its own rules for doing so.
• In the following graph, all the examples are the same shape because we don't have
labels to differentiate between examples of one type or another here:
• Fitting a line to unlabeled points isn't helpful. We still end up with examples of the
same shape on both sides of the line. Clearly we will have to try a different
approach.
• The figures are on next page 
GRAPHS:
© 2019 BHU_FILES under AMBALA COLLEGE OF ENGINEERING AND APPLIED RESEARCH | All Rights Reserved
• Here, we have two clusters. (Note that the number of clusters is arbitrary). What do these
clusters represent? It can be difficult to say. Sometimes the model finds patterns in the data that
you don't want it to learn, such as stereotypes or bias.
•
REINFORCEMENT LEARNING
• An additional branch of machine learning is reinforcement learning (RL). Reinforcement
learning differs from other types of machine learning. In RL you don't collect examples with
labels. Imagine you want to teach a machine to play a very basic video game and never lose.
You set up the model (often called an agent in RL) with the game, and you tell the model not to
get a "game over" screen. During training, the agent receives a reward when it performs this
task, which is called a reward function. With reinforcement learning, the agent can learn very
quickly how to outperform humans.
• Agent: It is an assumed entity which performs actions in an environment to gain some reward.
• Environment (e): A scenario that an agent has to face.
• Reward (R): An immediate return given to an agent when he or she performs specific action or task.
• State (s): State refers to the current situation returned by the environment.
SOME TERMS:
Clustering
– Clustering is typically done when labeled data is not available. This is an unsupervised learning
problem
Classification
– Classification requires a set of labels for the model to assign to a given item. This is a supervised
learning problem.
Regression
– Regression requires labeled numerical data. This is a supervised learning problem.
APPLICATIONS OF MACHINE LEARNING
• Virtual Personal Assistants
– Siri, Alexa, Google Now are some of the popular examples of virtual personal assistants. As
the name suggests, they assist in finding information, when asked over voice.
– Virtual Assistants are integrated to a variety of platforms. For example:
– Smart Speakers: Amazon Echo and Google Home
– Smartphones: Samsung Bixby on Samsung S8
– Mobile Apps: Google Allo
• Videos Surveillance
• Social Media Services
• Email Spam and Malware Filtering
• Online Customer Support
• Product Recommendations
• Online Fraud Detection
Machine learning is proving its potential to make cyberspace a secure place and tracking
monetary frauds online is one of its examples. For example: Paypal is using ML for protection
against money laundering. The company uses a set of tools that helps them to compare
millions of transactions taking place and distinguish between legitimate or illegitimate
transactions taking place between the buyers and sellers.
© 2019 BHU_FILES under AMBALA COLLEGE OF ENGINEERING AND APPLIED RESEARCH | All Rights Reserved
A SMALL EXAMPLE:
• http://localhost:8888/notebooks/CDAC%20important/week3/titanic_optimized%2
0BHUVAN%20CHOPRA.ipynb
SOURCES:
 https://developers.google.com/machine-learning/glossary#m
 https://docs.microsoft.com/en-us/azure/machine-learning/service/concept-deep-
learning-vs-machine-learning
 https://www.google.com/search?q=deep+learning&sxsrf=ACYBGNQXqpT6_63HgZ
gi_ig9QEn-
ZlBCaw:1573151221073&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiY2tb93Nj
lAhVBfH0KHSG9DLEQ_AUIEygC&cshid=1573151396797265&biw=1536&bih=754
&dpr=1.25#imgrc=TdQZL6LqyZk-iM:
 https://www.geeksforgeeks.org/best-python-libraries-for-machine-learning/
ANY QUERIES??

Machine Learning and its Applications

  • 1.
    MACHINE LEARNING AND ITSAPPLICATIONS SUBMITTED TO: SUBMITTED BY: Er. SEEMA RANI Bhuvan Chopra 2316011 © 2019 BHU_FILES under AMBALA COLLEGE OF ENGINEERING AND APPLIED RESEARCH | All Rights Reserved
  • 2.
    TABLE OF CONTENTS: MACHINE LEARNING(INTRODUCTION)  DIFFERENCE  BASIC PREREQUISITES  TYPES  APPLICATIONS  EXAMPLE © 2019 BHU_FILES under AMBALA COLLEGE OF ENGINEERING AND APPLIED RESEARCH | All Rights Reserved
  • 3.
    WHAT IS MACHINELEARNING?  Machine Learning Herbert Alexander Simon: “Learning is any process by which a system improves performance from experience.” Turing Award 1975 and Nobel Prize in Economics 1978  Herbert Simon “Machine Learning is concerned with computer programs that automatically improve their performance through experience. “ © 2019 BHU_FILES | All Rights Reserved
  • 4.
    MORE TO MACHINELEARNING • In basic terms, ML is the process of training a piece of software, called a model. • to make useful predictions using a data set. This predictive model can then serve up predictions about previously unseen data. • We use these predictions to take action in a product; • for example, the system predicts that a user will like a certain video, so the system recommends that video to the user. • DATASET EXAMPLES: https://mailchi.mp/start/q86rfojms6-358025?e=3c53d9959f
  • 5.
  • 6.
    DIFFERENCE BETWEEN ARTIFICIALINTELLIGENCE, MACHINE LEARNING, AND DEEP LEARNING • Artificial Intelligence “The ability of machines to work and think, like the human brain, is called Artificial Intelligence.” AI thinks, work, and reacts similarly to humans as it is designed in that way. However, Establishing the AI ultimately in our lives is not possible until now because there are many features of the human brain which are unable to describe. Some of the best examples of AI are face recognition on Facebook and images classification service of Interest. There are several cases of Artificial Intelligence, which we come through every day.
  • 7.
  • 8.
    MACHINE LEARNING • Machinelearning is a part of Artificial Intelligence. Most of the people consider it as Artificial Intelligence, but it's not true. The machines can learn. The robots learn themselves from the data provided to them. It makes more like to be a technique which makes us realize the presence of Artificial Intelligence. This technique uses algorithms to get data, learn, and then analyze the data. The results came in the form of predictions. You may have noticed when getting recommendation on shopping sites, Google, or Facebook. You get suggestions according to your interests. It is done with machine learning algorithms which are developed in the way to analyzing the recent searches, history, and other information. This technique also influences the marketing and banking sectors. • “Machine learning is the tendency of machines to learn from data analysis and achieve Artificial Intelligence.”
  • 9.
    • New machinelearning algorithms were limited to basic AI, but now it has become an essential part of this system. • Many complex algorithms are prepared to give better experience. It has turned the way of watching Shows and Movies. The entertainment industry is using this algorithm for providing suitable suggestions for its viewers on web channels like Netflix and Amazon Prime. • Machine learning is the concept of analyzing data and offers excellent recommendations based on learning from those points if you have questioned how the technique is implemented then read the next section that is Deep learning.
  • 10.
  • 11.
    DEEP LEARNING  Deeplearning is a subset of machine learning that's based on artificial neural networks. The learning process is deep because the structure of artificial neural networks consists of multiple input, output, and hidden layers. Each layer contains units that transform the input data into information that the next layer can use for a certain predictive task. Thanks to this structure, a machine can learn through its own data processing.
  • 12.
    PREREQUISITES AND PREWORK •Mastery of intro-level algebra. You should be comfortable with variables and coefficients, linear equations, graphs of functions, and histograms. (Familiarity with more advanced math concepts such as logarithms and derivatives is helpful, but not required.) • Proficiency in programming basics, and some experience coding in Python, writing Python code that contains basic programming constructs, such as function definitions/invocations, lists and dicts, loops, and conditional expressions. • Pandas: pandas is a column-oriented data analysis API. It's a great tool for handling and analyzing input data, and many ML frameworks support pandas data structures as inputs. Although a comprehensive introduction to the pandas API would span many pages, the core concepts are fairly straightforward. For a more complete reference, the pandas docs site contains extensive documentation and many tutorials. © 2019 BHU_FILES under AMBALA COLLEGE OF ENGINEERING AND APPLIED RESEARCH | All Rights Reserved
  • 13.
    Math Algebra •Variables, coefficients, andfunctions •Linear equations such as y=b+w1x1+w2x2 •Logarithms, and logarithmic equations such as y=ln(1+ez) •Sigmoid function Linear algebra •Tensor and tensor rank •Matrix multiplication Trigonometry •Tanh (discussed as an activation function; no prior knowledge needed) Statistics •Mean, median, outliers, and standard deviation •Ability to read a histogram
  • 14.
    PYTHON PROGRAMMING Basic Python Thefollowing Python basics are covered in The Python Tutorial: •Defining and calling functions, using positional and keyword parameters •Dictionaries, lists, sets (creating, accessing, and iterating) •for loops, for loops with multiple iterator variables (e.g., for a, b in [(1,2), (3,4)]) •if/else conditional blocks and conditional expressions •String formatting (e.g., '%.2f' % 3.14) •Variables, assignment, basic data types (int, float, bool, str) •The pass statement
  • 15.
    THIRD-PARTY PYTHON LIBRARIES •Matplotlib (for data visualization) • Seaborn (for heatmaps) • pandas (for data manipulation) • NumPy (for low-level math operations) • scikit-learn (for evaluation metrics) • Keras • PyTorch
  • 16.
    TRADITIONAL PROGRAMMING ANDMACHINE LEARNING • The above figure shows traditional programming and next is of machine learning:
  • 17.
    TYPES OF MACHINELEARNING © 2019 BHU_FILES under AMBALA COLLEGE OF ENGINEERING AND APPLIED RESEARCH | All Rights Reserved
  • 18.
    SUPERVISED LEARNING: • machinelearning takes data as input. lets call this data Training data. • For example, suppose you are an amateur botanist determined to differentiate between two species of the Lilliputian plant genus (a completely made-up plant). The two species look pretty similar. Fortunately, a botanist has put together a data set of Lilliputian plants she found in the wild along with their species name. • Here's a snippet of that data set:
  • 19.
    GOAL • Leaf widthand leaf length are the features (which is why the graph below labels both of these dimensions as X), while the species is the label. A real life botanical data set would probably contain far more features (including descriptions of flowers, blooming times, arrangement of leaves) but still have only one label. Features are measurements or descriptions; the label is essentially the "answer." For example, the goal of the data set is to help other botanists answer the question, "Which species is this plant?“ • In supervised machine learning, you feed the features and their corresponding labels into an algorithm in a process called training. During training, the algorithm gradually determines the relationship between features and their corresponding labels. Often times in machine learning, the model is very complex. However, suppose that this model can be represented as a line that separates big-leaf from small-leaf: © 2019 BHU_FILES under AMBALA COLLEGE OF ENGINEERING AND APPLIED RESEARCH | All Rights Reserved
  • 20.
  • 21.
  • 22.
    NUTSHELL • To tieit all together, supervised machine learning finds patterns between data and labels that can be expressed mathematically as functions. Given an input feature, you are telling the system what the expected output label is, thus you are supervising the training. The ML system will learn patterns on this labeled data. In the future, the ML system will use these patterns to make predictions on data that it did not see during training. • An exciting real-world example of supervised learning is a study from Stanford University that used a model to detect skin cancer in images.
  • 23.
    Unsupervised Learning • Inunsupervised learning, the goal is to identify meaningful patterns in the data.To accomplish this, the machine must learn from an unlabeled data set. In other words, the model has no hints how to categorize each piece of data and must infer its own rules for doing so. • In the following graph, all the examples are the same shape because we don't have labels to differentiate between examples of one type or another here: • Fitting a line to unlabeled points isn't helpful. We still end up with examples of the same shape on both sides of the line. Clearly we will have to try a different approach. • The figures are on next page 
  • 24.
    GRAPHS: © 2019 BHU_FILESunder AMBALA COLLEGE OF ENGINEERING AND APPLIED RESEARCH | All Rights Reserved
  • 26.
    • Here, wehave two clusters. (Note that the number of clusters is arbitrary). What do these clusters represent? It can be difficult to say. Sometimes the model finds patterns in the data that you don't want it to learn, such as stereotypes or bias. •
  • 27.
    REINFORCEMENT LEARNING • Anadditional branch of machine learning is reinforcement learning (RL). Reinforcement learning differs from other types of machine learning. In RL you don't collect examples with labels. Imagine you want to teach a machine to play a very basic video game and never lose. You set up the model (often called an agent in RL) with the game, and you tell the model not to get a "game over" screen. During training, the agent receives a reward when it performs this task, which is called a reward function. With reinforcement learning, the agent can learn very quickly how to outperform humans.
  • 28.
    • Agent: Itis an assumed entity which performs actions in an environment to gain some reward. • Environment (e): A scenario that an agent has to face. • Reward (R): An immediate return given to an agent when he or she performs specific action or task. • State (s): State refers to the current situation returned by the environment. SOME TERMS: Clustering – Clustering is typically done when labeled data is not available. This is an unsupervised learning problem Classification – Classification requires a set of labels for the model to assign to a given item. This is a supervised learning problem. Regression – Regression requires labeled numerical data. This is a supervised learning problem.
  • 29.
  • 30.
    • Virtual PersonalAssistants – Siri, Alexa, Google Now are some of the popular examples of virtual personal assistants. As the name suggests, they assist in finding information, when asked over voice. – Virtual Assistants are integrated to a variety of platforms. For example: – Smart Speakers: Amazon Echo and Google Home – Smartphones: Samsung Bixby on Samsung S8 – Mobile Apps: Google Allo • Videos Surveillance • Social Media Services • Email Spam and Malware Filtering • Online Customer Support • Product Recommendations
  • 31.
    • Online FraudDetection Machine learning is proving its potential to make cyberspace a secure place and tracking monetary frauds online is one of its examples. For example: Paypal is using ML for protection against money laundering. The company uses a set of tools that helps them to compare millions of transactions taking place and distinguish between legitimate or illegitimate transactions taking place between the buyers and sellers. © 2019 BHU_FILES under AMBALA COLLEGE OF ENGINEERING AND APPLIED RESEARCH | All Rights Reserved
  • 32.
    A SMALL EXAMPLE: •http://localhost:8888/notebooks/CDAC%20important/week3/titanic_optimized%2 0BHUVAN%20CHOPRA.ipynb
  • 33.
    SOURCES:  https://developers.google.com/machine-learning/glossary#m  https://docs.microsoft.com/en-us/azure/machine-learning/service/concept-deep- learning-vs-machine-learning https://www.google.com/search?q=deep+learning&sxsrf=ACYBGNQXqpT6_63HgZ gi_ig9QEn- ZlBCaw:1573151221073&source=lnms&tbm=isch&sa=X&ved=0ahUKEwiY2tb93Nj lAhVBfH0KHSG9DLEQ_AUIEygC&cshid=1573151396797265&biw=1536&bih=754 &dpr=1.25#imgrc=TdQZL6LqyZk-iM:  https://www.geeksforgeeks.org/best-python-libraries-for-machine-learning/
  • 34.