Machine learning and types

4,233 views 29 slides Mar 22, 2021
Slide 1
Slide 1 of 29
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29

About This Presentation

Machine learning, types of machine learning, supervised, unsupervised and reinforcement machine learning


Slide Content

MV PADMAVATI BHILAI INSTITUTE OF TECHNOLOGY, DURG, INDIA MACHINE LEARNING “Learning denotes changes in a system that ... enable a system to do the same task … more efficiently the next time.” - Herbert Simon

WHAT IS MACHINE LEARNING Arthur Samuel described it as: “The field of study that gives computers the ability to learn from data without being explicitly programmed.” 

MACHINE LEARNING Machine learning is a scientific discipline that is concerned with the design and development of algorithms that allow computers to learn based on data, such as from sensor data or databases. A major focus of machine learning research is to automatically learn to recognize complex patterns and make intelligent decisions based on data .

KIND OF PROBLEMS WHERE MACHINE LEARNING IS APPLICABLE

Traditional Programming Program Data Output ML algorithm Data Model (or) Hypothesis Data whose output is to be predicted Predicted Output Machine Learning Data will be divided into training and testing data.

Iris Dataset for Classification Sepal. length Sepal. width Petal.length Petal.width Class label 5.1 3.5 1.4 0.2 Iris- setosa 4.9 3 1.4 0.2 Iris- setosa 4.7 3.2 1.3 0.2 Iris- setosa 4.6 3.1 1.5 0.2 Iris- setosa 5 3.6 1.4 0.2 Iris- setosa 7 3.2 4.7 1.4 Iris- versicolor 6.4 3.2 4.5 1.5 Iris- versicolor 6.9 3.1 4.9 1.5 Iris- versicolor 5.5 2.3 4 1.3 Iris- versicolor 6.5 2.8 4.6 1.5 Iris- versicolor 6.1 2.8 4 1.3 Iris- versicolor 6.3 2.5 4.9 1.5 Iris- versicolor 6.1 2.8 4.7 1.2 Iris- versicolor 6.4 2.9 4.3 1.3 Iris- versicolor 6.3 3.3 6 2.5 Iris- virginica 5.8 2.7 5.1 1.9 Iris- virginica 7.1 3 5.9 2.1 Iris- virginica 6.3 2.9 5.6 1.8 Iris- virginica Data will be in the form of . csv , . json , .xml, excel file etc

Where can I get datasets? Kaggle  Datasets - https://www.kaggle.com/datasets Amazon data sets - https://registry.opendata.aws/ UCI Machine Learning Repository- https://archive.ics.uci.edu/ml/datasets.html Many more….. Prepare your  Datasets OR you can get data from

Machine Learning Steps

Machine Learning Tools Git and Github Python Jupyter Notebooks Numpy  - is mostly used to perform math based operations during the machine learning process. Pandas  - to import datasets and manage them Matplotlib - We will use this library to plot charts in python. scikit -learn  is an open source Python machine learning library  Many other Python APIs

Python for Machine Learning

Types of Machine Learning Supervised (labeled examples) Unsupervised (unlabeled examples) Reinforcement (reward)- Selects actions and observes consequences.

Supervised learning Machine learning takes data as input. lets call this data  Training data The training data includes both  Inputs  and L abels(Targets) We first train the model with the lots of training data(inputs & targets)

Types of Supervised learning Classification separates the data, Regression fits the data

Basic Problem : Induce a representation of a function (a systematic relationship between inputs and outputs) from examples. target function f: X → Y example ( x, f ( x )) hypothesis g: X → Y such that g ( x ) = f ( x ) x = set of attribute values ( attribute-value representation ) Y = set of discrete labels ( classification ) Y = continuous values  ( regression ) Inductive (Supervised) Learning

Classification This is a type of problem where we predict   the  categorical response  value where the data can be separated into specific “ classes ” (ex: we predict one of the values in a set of values). Some examples are : This mail is spam or not? Will it rain today or not? Is this picture a cat or not? Basically ‘Yes/No’ type questions called  binary classification. Other examples are : This mail is spam or important or promotion? Is this picture a cat or a dog or a tiger? This type is called  multi-class classification.

Iris Flower - 3 Variety Details Let us first understand the datasets The data set consists of: 150 samples 3 class labels: species of Iris ( Iris setosa , Iris virginica  and  Iris versicolor ) 4 features: Sepal length, Sepal width, Petal length, Petal Width in cm

Iris Dataset for Classification Sepal. length Sepal. width Petal.length Petal.width Species 5.1 3.5 1.4 0.2 Iris- setosa 4.9 3 1.4 0.2 Iris- setosa 4.7 3.2 1.3 0.2 Iris- setosa 4.6 3.1 1.5 0.2 Iris- setosa 5 3.6 1.4 0.2 Iris- setosa 7 3.2 4.7 1.4 Iris- versicolor 6.4 3.2 4.5 1.5 Iris- versicolor 6.9 3.1 4.9 1.5 Iris- versicolor 5.5 2.3 4 1.3 Iris- versicolor 6.5 2.8 4.6 1.5 Iris- versicolor 6.1 2.8 4 1.3 Iris- versicolor 6.3 2.5 4.9 1.5 Iris- versicolor 6.1 2.8 4.7 1.2 Iris- versicolor 6.4 2.9 4.3 1.3 Iris- versicolor 6.3 3.3 6 2.5 Iris- virginica 5.8 2.7 5.1 1.9 Iris- virginica 7.1 3 5.9 2.1 Iris- virginica 6.3 2.9 5.6 1.8 Iris- virginica

Regression This is a type of problem where we need to predict the  continuous response value (ex : above we predict number which can vary from infinity to +infinity) Some examples are What is the price of house in Durg ? What is the value of the stock? What can the temperature tomorrow? etc… there are tons of things we can predict if we wish.

Predicting Age- Regression Problem

Unsupervised Learning The training data does not include Targets here so we don’t tell the system where to go, the system has to understand itself from the data we give.

Clustering This is a type of problem where we  group similar things together. It is similar to multi class classification but here we don’t provide the labels, the system understands from data itself and cluster the data. Some examples are : Given news articles, cluster into different types of news Given a set of tweets, cluster based on content of tweet Given a set of images, cluster them into different objects

You’re running a company, and you want to develop learning algorithms to address each of two problems. Problem 1: You have a large inventory of identical items. You want to predict how many of these items will sell over the next 3 months. Problem 2: You’d like software to examine individual customer accounts, and for each account decide if it has been hacked or not. Should you treat these as classification or as regression problems? Treat both as classification problems. Treat problem 1 a s a classification problem, problem 2 as a regression problem. Treat problem 1 as a regression problem, problem 2 as a classification problem . Treat both as regression problems.

Of the following examples, which learning you make use of 3. Given a database of customer data, automatically discover market segments and group customers into different market segments. 1. Given email labeled as spam/not spam, learn a spam filter. 2. Given a set of news articles found on the web, group them into set of articles about the same story. 4. Given a dataset of patients diagnosed as either having diabetes or not, learn to classify new patients as having diabetes or not. Ans 1: Supervised Learning - Classification Ans 2: Unsupervised Learning - Clustering Ans 3: Unsupervised Learning - Clustering Ans 4: Supervised Learning - Classification

Reinforcement learning Close to human learning. Algorithm learns a policy of how to act in a given environment. Every action has some impact in the environment, and the environment provides rewards that guides the learning algorithm.

Reinforcement learning Examples: A robot cleaning my room and recharging its battery Robot-soccer How to invest in shares Modeling the economy through rational agents Learning how to fly a helicopter Scheduling planes to their destinations

Reinforcement learning Meaning of Reinforcement: Occurrence of an event, in the proper relation to a response, that tends to increase the probability that the response will occur again in the same situation. Reinforcement learning is the problem faced by an agent that learns behavior through trial-and-error interactions with a dynamic environment. Reinforcement Learning is learning how to act in order to maximize a numerical reward.

Elements of Reinforcement learning

Reinforcement learning