Unit Iii Classification
Unit Iii Classification
Classification:
There are two forms of data analysis that can be used for extracting models describing
important classes or to predict future data trends. These two forms are as follows −
1. Classification
2. Prediction
Classification models predict categorical class labels; and prediction models predict
continuous valued functions. For example, we can build a classification model to
categorize bank loan applications as either safe or risky,
or a prediction model to predict the expenditures in dollars of potential customers on
computer equipment given their income and occupation.
Classification
Classification is a form of data analysis that extracts models describing important data classes.
Such models, called classifiers, predict categorical (discrete, unordered) class labels.
For example, we can build a classification model to categorize bank loan applications as either
safe or risky. Such analysis can help provide us with a better understanding of the data at large.
Classification:
predicts categorical class labels
classifies data based on the training set and the values in a classification attribute and uses
it in classifying new data
General Approach to Classification
Data classification is a two-step process, consisting of a
1. learning step (where a classification model is constructed) and
2. a classification step (where the model is used to predict class labels for given data).
General Approach for Building Classification Model
4
3 No Small 70K No
6 No Medium 60K No
Training Set
Apply
Tid Attrib1 Attrib2 Attrib3 Class Model
11 No Small 55K ?
15 No Large 67K ?
10
Test Set
Introduction to Data Mining, 2nd Edition 04/12/2022
How Does Classification Works?
The Data Classification process includes two steps −
1. Building the Classifier or Model
2. Using Classifier for Classification
Classifier
(Jeff, Professor, 4)
Supervised Classification
The set of possible classes is known in advance.
Unsupervised Classification
Set of possible classes is not known. After classification we can try to assign a
name to that class.
Unsupervised classification is called clustering.
16 Supervised learning
Supervised learning, as the name indicates, has the presence of a supervisor as
a teacher.
Basically supervised learning is when we teach or train the machine using data
that is well labeled.
Which means some data is already tagged with the correct answer.
After that, the machine is provided with a new set of examples(data) so that
the supervised learning algorithm analyses the training data(set of training
examples) and produces a correct outcome from labeled data.
CS 40003: Data
Analytics
Supervised learning classified into two categories of algorithms:
Classification: A classification problem is when the output variable is a
category, such as “Red” or “blue” or “disease” and “no disease”.
Regression: A regression problem is when the output variable is a real
value, such as “dollars” or “weight”.
22 Unsupervised learning
Unsupervised learning is the training of a machine using information that is neither
classified nor labeled and allowing the algorithm to act on that information without
guidance.
Here the task of the machine is to group unsorted information according to
similarities, patterns, and differences without any prior training of data.
Unlike supervised learning, no teacher is provided that means no training will be
given to the machine.
Therefore the machine is restricted to find the hidden structure in unlabeled data by
itself.
But it can categorize them according to their similarities, patterns, and differences,
i.e., we can easily categorize the above picture into two parts.
The first may contain all pics having dogs in it and the second part may contain all pics
having cats in it.
Here you didn’t learn anything before, which means no training data or examples.
Classification Techniques
25
A number of classification techniques are known, which can be broadly classified into the following
categories:
1. Statistical-Based Methods
•Regression
•Bayesian Classifier
•
2. Distance-Based Classification
•Simple approach
•K-Nearest Neighbours
Bayesian classification uses Bayes theorem to predict the occurrence of any event.
Bayesian classifiers are the statistical classifiers with the Bayesian probability
understandings. The theory expresses how a level of belief, expressed as a probability.
Bayes theorem came into existence after Thomas Bayes, who first utilized conditional
probability to provide an algorithm that uses evidence to calculate limits on an unknown
parameter.
Bayesian Classifier
33
Principle
If it walks like a duck, quacks like a duck, then it is probably a duck
Bayesian Classifier
34
A statistical classifier
Foundation
Assumptions
1.The classes are mutually exclusive and exhaustive.
2.The attributes are independent given the class.
Given this is the knowledge of data and classes, we are to find most likely
classification for any other unseen instance, for example:
Week Day Winter High None ???
In many applications, the relationship between the attributes set and the class variable is
non-deterministic.
More precisely, Bayesian classifier use Bayes’ Theorem of Probability for classification.
Before going to discuss the Bayesian classifier, we should have a quick look at the
Theory of Probability and then Bayes’ Theorem.
Naive Bayes Algorithm
Naïve Bayes algorithm is a supervised learning algorithm.
It is a classification technique based on Bayes’ Theorem with an assumption of independence
among predictors. In simple terms, a Naive Bayes classifier assumes that the presence of a
particular feature in a class is unrelated to the presence of any other feature.
For example, a fruit may be considered to be an apple if it is red, round, and about 3 inches in
diameter. Even if these features depend on each other or upon the existence of the other features,
all of these properties independently contribute to the probability that this fruit is an apple and
that is why it is known as ‘Naive’.
It is mainly used in text classification that includes a high-dimensional training dataset.
Bayes' Theorem: