SlideShare une entreprise Scribd logo
1  sur  17
Télécharger pour lire hors ligne
WEKA
IT For Business Intelligence

Ishan Awadhesh
10BM60033 • Term Paper • 19 April 2012




Vinod Gupta School of Management, IIT Kharagpur
   1
Table of Contents

WEKA!                                              3

Data Used!                                         5

Classification Analysis!                           6

Cluster Analysis!                                  11

Other Applications of Weka!                        17

References!                                        17




Vinod Gupta School of Management, IIT Kharagpur
   2
WEKA
Waikato Environment for Knowledge Analysis

DATA MINING TECHNIQUES

WEKA is a collection of state-of-the-art machine learning algorithms and data preprocessing
tools written in Java, developed at the University of Waikato, New Zealand. It is free software
that runs on almost any platform and is available under the GNU General Public License. It
has a wide range of applications in various data mining techniques. It provides extensive
support for the entire process of experimental data mining, including preparing the input
data, evaluating learning schemes statistically, and visualizing the input data and the result of
learning. The WEKA workbench includes methods for the main data mining problems:
regression, classification, clustering, association rule mining, and attribute selection. It can
be used in either of the following two interfaces –
•!    Command Line Interface (CLI)
•!    Graphical User Interface (GUI)



The WEKA GUI Chooser appears like this –




Vinod Gupta School of Management, IIT Kharagpur
                                                    3
The buttons can be used to start the following applications –
        •Explorer – Environment for exploring data with WEKA. It gives access to all the
        facilities using menu selection and form filling.
        •Experimenter – It can be used to get the answer for a question: Which methods and
        parameter values work best for the given problem?
        •KnowledgeFlow – Same function as explorer. Supports incremental learning. It
        allows designing configurations for streamed data processing. Incremental algorithms
        can be used to process very large datasets.
        •Simple CLI – It provides a simple Command Line Interface for directly executing
        WEKA commands.


This term paper will demonstrate the following two data mining techniques using WEKA:
•Classification
•Clustering (Simple K Means)




Vinod Gupta School of Management, IIT Kharagpur
                                           4
Data Used
The data used in this paper is Bank Data available in Comma Separated Values format




The data contains following fields
id - a unique identification number
age - age of customer in years (numeric)
sex - MALE / FEMALE
region - inner_city/rural/suburban/town
income- income of customer (numeric)
married - is the customer married (YES/NO)
children - number of children (numeric)
car - does the customer own a car (YES/NO)
save_acct - does the customer have a saving account (YES/NO)
current_acct - does the customer have a current account (YES/NO)
mortgage - does the customer have a mortgage (YES/NO)
pep - did customer buy a PEP (Personal Equity Plan) after the last mailing (YES/NO)




Vinod Gupta School of Management, IIT Kharagpur
                                      5
Classification Analysis

Question

"How likely is person X to buy the new Personal Equity?" By creating a classification tree (a
decision tree), the data can be mined to determine the likelihood of this person to buy a new
PEP. Possible nodes on the tree would be children, income level, marital status. The
attributes of this person can be used against the decision tree to determine the likelihood of
him purchasing the Personal Equity Plan.

Load the data file Bank_Data.CSV into WEKA. This file contains 900 records of present
customers of Bank.
We need to divide up our records so some data instances are used to create the model, and
some are used to test the model to ensure that we didn't overfit it.
Your screen should look like Figure 1 after loading the data.


Figure 1.Bank Data Classification in Weka




We select the Classify tab, then we select the trees node, then the J48 leaf




Vinod Gupta School of Management, IIT Kharagpur
                                                 6
Figure 2.Bank Data Classification Algorithm




At this point, we are ready to create our model in WEKA. Ensure that Use training set is
selected so we use the data set we just loaded to create our model. Click Start and let WEKA
run. The output from this model should look like the results in Listing 1.




Vinod Gupta School of Management, IIT Kharagpur
                                               7
Listing 1.Output from WEKA’s classification model




What do these numbers mean-
Correctly Classified Instances - 92.3333%
Incorrectly Classified Instances- 7.6667%
False Positives- 29
False Negatives-17
Based on our accuracy rate of 92.3333%, we can say that this is a pretty good model to predict
whether a new customer will buy Personal Equity Plan or not.



Vinod Gupta School of Management, IIT Kharagpur
                                             8
You can see the tree by right-clicking on the model you just created, in the result list. On the
pop-up menu, select Visualize tree. You'll see the classification tree we just created,
although in this example, the visual tree doesn't offer much help.


Figure 3. Classification Tree Visualization




There's one final step to validating our classification tree, which is to run our test set through
the model and ensure that accuracy of the model when evaluating the test set isn't too
different from the training set. To do this, in Test options, select the Supplied test set radio
button and click Set. Choose the file bmw-test.arff, which contains 1,500 records that were
not in the training set we used to create the model. When we click Start this time, WEKA will
run this test data set through the model we already created and let us know how the model did.
Let's do that, by clicking Start. Below is the output.




Vinod Gupta School of Management, IIT Kharagpur
                                                   9
Listing 2.Output from WEKA’s classification model of Test Data




Comparing the "Correctly Classified Instances" from this test set (90.5 percent) with the
"Correctly Classified Instances" from the training set (92.3333 percent), we see that the
accuracy of the model is pretty close, which indicates that the model will not break down with
unknown data, or when future data is applied to it.




Vinod Gupta School of Management, IIT Kharagpur
                                            10
Cluster Analysis

Question: "What age groups more likely to buy Personal Equity Plan?" The data can be
mined to compare the age of the purchaser of past PEP . From this data, it could be found
whether certain age groups (22-30 year olds, for example) have a higher propensity to to go
for PEP. The data, when mined, will tend to cluster around certain age groups and certain
colors, allowing the user to quickly determine patterns in the data.


Load the data file Bank_data.CSV into WEKA using the same steps we used to load data into
the Preprocess tab. Take a few minutes to look around the data in this tab. Look at the
columns, the attribute data, the distribution of the columns, etc. Your screen should look like
Figure 4 after loading the data.


Figure 4. Bank cluster data in Weka




With this data set, we are looking to create clusters, so instead of clicking on the Classify tab,
click on the Cluster tab. Click Choose and select SimpleKMeans from the choices that appear
(this will be our preferred method of clustering for this article).


Vinod Gupta School of Management, IIT Kharagpur
                                                11
Finally, we want to adjust the attributes of our cluster algorithm by clicking SimpleKMeans .
The only attribute of the algorithm we are interested in adjusting here is the numClusters
field, which tells us how many clusters we want to create. Let's change the default value of 2 to
5 for now, but keep these steps in mind later if you want to adjust the number of clusters
created. Your WEKA Explorer should look like Figure 5 at this point. Click OK to accept
these values.


Figure 5. Cluster Attributes




At this point, we are ready to run the clustering algorithm. Remember that 100 rows of data
with five data clusters would likely take a few hours of computation with a spreadsheet, but
WEKA can spit out the answer in less than a second. Your output should look like Listing 3.




Vinod Gupta School of Management, IIT Kharagpur
                                               12
Listing 3. Cluster Output with 5 clusters




Vinod Gupta School of Management, IIT Kharagpur
   13
Listing 4. Cluster Output with 10 Clusters




Clusters


One thing that is clear from the clusters is that behavior of Male are clustered in only 2-3
groups while females behavior are heavily distributed among 7 clusters, so preparing an
offering for a specific


Description of Clusters-


Cluster 0- This group consists of unmarried, mid-income earning females in their early 40’s
who live in rural areas. They have on an average two children, no car and personal equity plan
but they do have savings and current account.


Cluster 1- This group consists of married, high-income earning females in their late 40’s who
live in rural areas. They have on an average two children,no car and personal equity plan but
they do have savings and current account.


Cluster 2- This group consists of married, low-income earning females in their early 40’s who
live in inner city. They have on an average one child, no car and savings account but they do
have current account and personal equity plan.



Vinod Gupta School of Management, IIT Kharagpur
                                                14
Cluster 3- This group consists of married, low-income earning females in their early 30’s who
live in town. They have on an average one or two children, no car, savings account and
personal equity plan but they do have current account.


Cluster 4- This group consists of married, mid-income earning males in their late 30’s who
live in inner city. They have on an average one or no child, no savings account but they do
have personal equity plan, savings & current account.


Cluster 5- This group consists of unmarried, high-income earning males in their early 40’s
who live in town. They have on an average one or no child, they have car, personal equity plan,
savings & current account.


Cluster 6- This group consists of married, mid-income earning females in their early 40’s
who live in inner city. They mostly don’t have ant child, they do not have any savings account
and personal equity plan but they do have current account.


Cluster 7- This group consists of unmarried, high-income earning females in their mid 40’s
who live in inner city. They have on an average one or two child, no car and personal equity
plan but they do have savings & current account.


Cluster 8- This group consists of unmarried, high-income earning females in their mid 40’s
who live in town. They have on an average one or no child, no personal equity plan but they do
have car, savings & current account.


Cluster 9- This group consists of married, mid-income earning males in their early 40’s who
live in inner city. They have on an average one or two children, no car, personal equity   plan
and current account but they do have savings account.




Vinod Gupta School of Management, IIT Kharagpur
                                               15
One other interesting way to examine the data in these clusters is to inspect it visually. To do
this, you should right-click on theResult List section of the Cluster tab . One of the options
from this pop-up menu is Visualize Cluster Assignments. A window will pop up that lets you
play with the results and see them visually. For this example, change the X axis to be income
(Num), the Y axis to children (Num), and the Color to Cluster (Nom). This will show us in a
chart how the clusters are grouped in terms of income and no’ of children. Also, turn up the
"Jitter" to about three-fourths of the way maxed out, which will artificially scatter the plot
points to allow us to see them more easily.


Figure 6. Cluster Visual Inspection




Vinod Gupta School of Management, IIT Kharagpur
                                                 16
Other Applications of Weka

•DISCRETIZATION

•REGRESSION

•NEAREST NEIGHBOR




References
https://www.ibm.com/developerworks/opensource/library/os-weka2/
http://maya.cs.depaul.edu/classes/ect584/weka/preprocess.html
http://www.cs.waikato.ac.nz/~ml/weka/




Vinod Gupta School of Management, IIT Kharagpur
                  17

Contenu connexe

Tendances

Unsupervised learning
Unsupervised learningUnsupervised learning
Unsupervised learningamalalhait
 
Bias and variance trade off
Bias and variance trade offBias and variance trade off
Bias and variance trade offVARUN KUMAR
 
Brief introduction to data visualization
Brief introduction to data visualizationBrief introduction to data visualization
Brief introduction to data visualizationZach Gemignani
 
Prediction of Heart Disease using Machine Learning Algorithms: A Survey
Prediction of Heart Disease using Machine Learning Algorithms: A SurveyPrediction of Heart Disease using Machine Learning Algorithms: A Survey
Prediction of Heart Disease using Machine Learning Algorithms: A Surveyrahulmonikasharma
 
Data science applications and usecases
Data science applications and usecasesData science applications and usecases
Data science applications and usecasesSreenatha Reddy K R
 
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...Simplilearn
 
Lecture-12Evaluation Measures-ML.pptx
Lecture-12Evaluation Measures-ML.pptxLecture-12Evaluation Measures-ML.pptx
Lecture-12Evaluation Measures-ML.pptxGauravSonawane51
 
Introduction to data science
Introduction to data scienceIntroduction to data science
Introduction to data scienceMahir Haque
 
Data preprocessing in Machine learning
Data preprocessing in Machine learning Data preprocessing in Machine learning
Data preprocessing in Machine learning pyingkodi maran
 
Introduction to Machine Learning Classifiers
Introduction to Machine Learning ClassifiersIntroduction to Machine Learning Classifiers
Introduction to Machine Learning ClassifiersFunctional Imperative
 
Exploratory data analysis
Exploratory data analysisExploratory data analysis
Exploratory data analysisGramener
 
Data visualization using R
Data visualization using RData visualization using R
Data visualization using RUmmiya Mohammedi
 

Tendances (20)

Unsupervised learning
Unsupervised learningUnsupervised learning
Unsupervised learning
 
Data Visualization Tools
Data Visualization ToolsData Visualization Tools
Data Visualization Tools
 
Bias and variance trade off
Bias and variance trade offBias and variance trade off
Bias and variance trade off
 
Brief introduction to data visualization
Brief introduction to data visualizationBrief introduction to data visualization
Brief introduction to data visualization
 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
 
Data Visualization
Data VisualizationData Visualization
Data Visualization
 
Prediction of Heart Disease using Machine Learning Algorithms: A Survey
Prediction of Heart Disease using Machine Learning Algorithms: A SurveyPrediction of Heart Disease using Machine Learning Algorithms: A Survey
Prediction of Heart Disease using Machine Learning Algorithms: A Survey
 
Statistics for data science
Statistics for data science Statistics for data science
Statistics for data science
 
Data science applications and usecases
Data science applications and usecasesData science applications and usecases
Data science applications and usecases
 
Data Visualization - A Brief Overview
Data Visualization - A Brief OverviewData Visualization - A Brief Overview
Data Visualization - A Brief Overview
 
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
Machine Learning Algorithms | Machine Learning Tutorial | Data Science Algori...
 
Lecture-12Evaluation Measures-ML.pptx
Lecture-12Evaluation Measures-ML.pptxLecture-12Evaluation Measures-ML.pptx
Lecture-12Evaluation Measures-ML.pptx
 
Introduction to data science
Introduction to data scienceIntroduction to data science
Introduction to data science
 
Id3,c4.5 algorithim
Id3,c4.5 algorithimId3,c4.5 algorithim
Id3,c4.5 algorithim
 
Data preprocessing in Machine learning
Data preprocessing in Machine learning Data preprocessing in Machine learning
Data preprocessing in Machine learning
 
Introduction to Machine Learning Classifiers
Introduction to Machine Learning ClassifiersIntroduction to Machine Learning Classifiers
Introduction to Machine Learning Classifiers
 
Exploratory data analysis
Exploratory data analysisExploratory data analysis
Exploratory data analysis
 
Introduction to Data Mining
Introduction to Data MiningIntroduction to Data Mining
Introduction to Data Mining
 
Data visualization using R
Data visualization using RData visualization using R
Data visualization using R
 
Decision tree
Decision treeDecision tree
Decision tree
 

Similaire à Classification and Clustering Analysis using Weka

Weka_Manual_Sagar
Weka_Manual_SagarWeka_Manual_Sagar
Weka_Manual_SagarSagar Kumar
 
Barga Data Science lecture 10
Barga Data Science lecture 10Barga Data Science lecture 10
Barga Data Science lecture 10Roger Barga
 
Feature extraction for classifying students based on theirac ademic performance
Feature extraction for classifying students based on theirac ademic performanceFeature extraction for classifying students based on theirac ademic performance
Feature extraction for classifying students based on theirac ademic performanceVenkat Projects
 
Post Graduate Admission Prediction System
Post Graduate Admission Prediction SystemPost Graduate Admission Prediction System
Post Graduate Admission Prediction SystemIRJET Journal
 
AI TESTING: ENSURING A GOOD DATA SPLIT BETWEEN DATA SETS (TRAINING AND TEST) ...
AI TESTING: ENSURING A GOOD DATA SPLIT BETWEEN DATA SETS (TRAINING AND TEST) ...AI TESTING: ENSURING A GOOD DATA SPLIT BETWEEN DATA SETS (TRAINING AND TEST) ...
AI TESTING: ENSURING A GOOD DATA SPLIT BETWEEN DATA SETS (TRAINING AND TEST) ...ijsc
 
Loan Analysis Predicting Defaulters
Loan Analysis Predicting DefaultersLoan Analysis Predicting Defaulters
Loan Analysis Predicting DefaultersIRJET Journal
 
IRJET- Analysis of Brand Value Prediction based on Social Media Data
IRJET-  	  Analysis of Brand Value Prediction based on Social Media DataIRJET-  	  Analysis of Brand Value Prediction based on Social Media Data
IRJET- Analysis of Brand Value Prediction based on Social Media DataIRJET Journal
 
data-science-lifecycle-ebook.pdf
data-science-lifecycle-ebook.pdfdata-science-lifecycle-ebook.pdf
data-science-lifecycle-ebook.pdfDanilo Cardona
 
A Comparative Study on Identical Face Classification using Machine Learning
A Comparative Study on Identical Face Classification using Machine LearningA Comparative Study on Identical Face Classification using Machine Learning
A Comparative Study on Identical Face Classification using Machine LearningIRJET Journal
 
BIG MART SALES PREDICTION USING MACHINE LEARNING
BIG MART SALES PREDICTION USING MACHINE LEARNINGBIG MART SALES PREDICTION USING MACHINE LEARNING
BIG MART SALES PREDICTION USING MACHINE LEARNINGIRJET Journal
 
STOCK MARKET ANALYZING AND PREDICTION USING MACHINE LEARNING TECHNIQUES
STOCK MARKET ANALYZING AND PREDICTION USING MACHINE LEARNING TECHNIQUESSTOCK MARKET ANALYZING AND PREDICTION USING MACHINE LEARNING TECHNIQUES
STOCK MARKET ANALYZING AND PREDICTION USING MACHINE LEARNING TECHNIQUESIRJET Journal
 
LOAN APPROVAL PRDICTION SYSTEM USING MACHINE LEARNING.
LOAN APPROVAL PRDICTION SYSTEM USING MACHINE LEARNING.LOAN APPROVAL PRDICTION SYSTEM USING MACHINE LEARNING.
LOAN APPROVAL PRDICTION SYSTEM USING MACHINE LEARNING.Souma Maiti
 
Introduction to Machine Learning and Data Science using the Autonomous databa...
Introduction to Machine Learning and Data Science using the Autonomous databa...Introduction to Machine Learning and Data Science using the Autonomous databa...
Introduction to Machine Learning and Data Science using the Autonomous databa...Sandesh Rao
 
The 8 Step Data Mining Process
The 8 Step Data Mining ProcessThe 8 Step Data Mining Process
The 8 Step Data Mining ProcessMarc Berman
 
Machine Learning in Autonomous Data Warehouse
 Machine Learning in Autonomous Data Warehouse Machine Learning in Autonomous Data Warehouse
Machine Learning in Autonomous Data WarehouseSandesh Rao
 
IRJET- Sentimental Analysis of Product Reviews for E-Commerce Websites
IRJET- Sentimental Analysis of Product Reviews for E-Commerce WebsitesIRJET- Sentimental Analysis of Product Reviews for E-Commerce Websites
IRJET- Sentimental Analysis of Product Reviews for E-Commerce WebsitesIRJET Journal
 
Introduction to Machine Learning and Data Science using Autonomous Database ...
Introduction to Machine Learning and Data Science using Autonomous Database  ...Introduction to Machine Learning and Data Science using Autonomous Database  ...
Introduction to Machine Learning and Data Science using Autonomous Database ...Sandesh Rao
 
Andrew NG machine learning
Andrew NG machine learningAndrew NG machine learning
Andrew NG machine learningShareDocView.com
 

Similaire à Classification and Clustering Analysis using Weka (20)

Weka_Manual_Sagar
Weka_Manual_SagarWeka_Manual_Sagar
Weka_Manual_Sagar
 
Barga Data Science lecture 10
Barga Data Science lecture 10Barga Data Science lecture 10
Barga Data Science lecture 10
 
Data Mining using Weka
Data Mining using WekaData Mining using Weka
Data Mining using Weka
 
Feature extraction for classifying students based on theirac ademic performance
Feature extraction for classifying students based on theirac ademic performanceFeature extraction for classifying students based on theirac ademic performance
Feature extraction for classifying students based on theirac ademic performance
 
Post Graduate Admission Prediction System
Post Graduate Admission Prediction SystemPost Graduate Admission Prediction System
Post Graduate Admission Prediction System
 
AI TESTING: ENSURING A GOOD DATA SPLIT BETWEEN DATA SETS (TRAINING AND TEST) ...
AI TESTING: ENSURING A GOOD DATA SPLIT BETWEEN DATA SETS (TRAINING AND TEST) ...AI TESTING: ENSURING A GOOD DATA SPLIT BETWEEN DATA SETS (TRAINING AND TEST) ...
AI TESTING: ENSURING A GOOD DATA SPLIT BETWEEN DATA SETS (TRAINING AND TEST) ...
 
Loan Analysis Predicting Defaulters
Loan Analysis Predicting DefaultersLoan Analysis Predicting Defaulters
Loan Analysis Predicting Defaulters
 
IRJET- Analysis of Brand Value Prediction based on Social Media Data
IRJET-  	  Analysis of Brand Value Prediction based on Social Media DataIRJET-  	  Analysis of Brand Value Prediction based on Social Media Data
IRJET- Analysis of Brand Value Prediction based on Social Media Data
 
Data Mining GUI Tools with Demo
Data Mining GUI Tools with DemoData Mining GUI Tools with Demo
Data Mining GUI Tools with Demo
 
data-science-lifecycle-ebook.pdf
data-science-lifecycle-ebook.pdfdata-science-lifecycle-ebook.pdf
data-science-lifecycle-ebook.pdf
 
A Comparative Study on Identical Face Classification using Machine Learning
A Comparative Study on Identical Face Classification using Machine LearningA Comparative Study on Identical Face Classification using Machine Learning
A Comparative Study on Identical Face Classification using Machine Learning
 
BIG MART SALES PREDICTION USING MACHINE LEARNING
BIG MART SALES PREDICTION USING MACHINE LEARNINGBIG MART SALES PREDICTION USING MACHINE LEARNING
BIG MART SALES PREDICTION USING MACHINE LEARNING
 
STOCK MARKET ANALYZING AND PREDICTION USING MACHINE LEARNING TECHNIQUES
STOCK MARKET ANALYZING AND PREDICTION USING MACHINE LEARNING TECHNIQUESSTOCK MARKET ANALYZING AND PREDICTION USING MACHINE LEARNING TECHNIQUES
STOCK MARKET ANALYZING AND PREDICTION USING MACHINE LEARNING TECHNIQUES
 
LOAN APPROVAL PRDICTION SYSTEM USING MACHINE LEARNING.
LOAN APPROVAL PRDICTION SYSTEM USING MACHINE LEARNING.LOAN APPROVAL PRDICTION SYSTEM USING MACHINE LEARNING.
LOAN APPROVAL PRDICTION SYSTEM USING MACHINE LEARNING.
 
Introduction to Machine Learning and Data Science using the Autonomous databa...
Introduction to Machine Learning and Data Science using the Autonomous databa...Introduction to Machine Learning and Data Science using the Autonomous databa...
Introduction to Machine Learning and Data Science using the Autonomous databa...
 
The 8 Step Data Mining Process
The 8 Step Data Mining ProcessThe 8 Step Data Mining Process
The 8 Step Data Mining Process
 
Machine Learning in Autonomous Data Warehouse
 Machine Learning in Autonomous Data Warehouse Machine Learning in Autonomous Data Warehouse
Machine Learning in Autonomous Data Warehouse
 
IRJET- Sentimental Analysis of Product Reviews for E-Commerce Websites
IRJET- Sentimental Analysis of Product Reviews for E-Commerce WebsitesIRJET- Sentimental Analysis of Product Reviews for E-Commerce Websites
IRJET- Sentimental Analysis of Product Reviews for E-Commerce Websites
 
Introduction to Machine Learning and Data Science using Autonomous Database ...
Introduction to Machine Learning and Data Science using Autonomous Database  ...Introduction to Machine Learning and Data Science using Autonomous Database  ...
Introduction to Machine Learning and Data Science using Autonomous Database ...
 
Andrew NG machine learning
Andrew NG machine learningAndrew NG machine learning
Andrew NG machine learning
 

Dernier

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxAmita Gupta
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxVishalSingh1417
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 

Dernier (20)

Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 

Classification and Clustering Analysis using Weka

  • 1. WEKA IT For Business Intelligence Ishan Awadhesh 10BM60033 • Term Paper • 19 April 2012 Vinod Gupta School of Management, IIT Kharagpur 1
  • 2. Table of Contents WEKA! 3 Data Used! 5 Classification Analysis! 6 Cluster Analysis! 11 Other Applications of Weka! 17 References! 17 Vinod Gupta School of Management, IIT Kharagpur 2
  • 3. WEKA Waikato Environment for Knowledge Analysis DATA MINING TECHNIQUES WEKA is a collection of state-of-the-art machine learning algorithms and data preprocessing tools written in Java, developed at the University of Waikato, New Zealand. It is free software that runs on almost any platform and is available under the GNU General Public License. It has a wide range of applications in various data mining techniques. It provides extensive support for the entire process of experimental data mining, including preparing the input data, evaluating learning schemes statistically, and visualizing the input data and the result of learning. The WEKA workbench includes methods for the main data mining problems: regression, classification, clustering, association rule mining, and attribute selection. It can be used in either of the following two interfaces – •! Command Line Interface (CLI) •! Graphical User Interface (GUI) The WEKA GUI Chooser appears like this – Vinod Gupta School of Management, IIT Kharagpur 3
  • 4. The buttons can be used to start the following applications – •Explorer – Environment for exploring data with WEKA. It gives access to all the facilities using menu selection and form filling. •Experimenter – It can be used to get the answer for a question: Which methods and parameter values work best for the given problem? •KnowledgeFlow – Same function as explorer. Supports incremental learning. It allows designing configurations for streamed data processing. Incremental algorithms can be used to process very large datasets. •Simple CLI – It provides a simple Command Line Interface for directly executing WEKA commands. This term paper will demonstrate the following two data mining techniques using WEKA: •Classification •Clustering (Simple K Means) Vinod Gupta School of Management, IIT Kharagpur 4
  • 5. Data Used The data used in this paper is Bank Data available in Comma Separated Values format The data contains following fields id - a unique identification number age - age of customer in years (numeric) sex - MALE / FEMALE region - inner_city/rural/suburban/town income- income of customer (numeric) married - is the customer married (YES/NO) children - number of children (numeric) car - does the customer own a car (YES/NO) save_acct - does the customer have a saving account (YES/NO) current_acct - does the customer have a current account (YES/NO) mortgage - does the customer have a mortgage (YES/NO) pep - did customer buy a PEP (Personal Equity Plan) after the last mailing (YES/NO) Vinod Gupta School of Management, IIT Kharagpur 5
  • 6. Classification Analysis Question "How likely is person X to buy the new Personal Equity?" By creating a classification tree (a decision tree), the data can be mined to determine the likelihood of this person to buy a new PEP. Possible nodes on the tree would be children, income level, marital status. The attributes of this person can be used against the decision tree to determine the likelihood of him purchasing the Personal Equity Plan. Load the data file Bank_Data.CSV into WEKA. This file contains 900 records of present customers of Bank. We need to divide up our records so some data instances are used to create the model, and some are used to test the model to ensure that we didn't overfit it. Your screen should look like Figure 1 after loading the data. Figure 1.Bank Data Classification in Weka We select the Classify tab, then we select the trees node, then the J48 leaf Vinod Gupta School of Management, IIT Kharagpur 6
  • 7. Figure 2.Bank Data Classification Algorithm At this point, we are ready to create our model in WEKA. Ensure that Use training set is selected so we use the data set we just loaded to create our model. Click Start and let WEKA run. The output from this model should look like the results in Listing 1. Vinod Gupta School of Management, IIT Kharagpur 7
  • 8. Listing 1.Output from WEKA’s classification model What do these numbers mean- Correctly Classified Instances - 92.3333% Incorrectly Classified Instances- 7.6667% False Positives- 29 False Negatives-17 Based on our accuracy rate of 92.3333%, we can say that this is a pretty good model to predict whether a new customer will buy Personal Equity Plan or not. Vinod Gupta School of Management, IIT Kharagpur 8
  • 9. You can see the tree by right-clicking on the model you just created, in the result list. On the pop-up menu, select Visualize tree. You'll see the classification tree we just created, although in this example, the visual tree doesn't offer much help. Figure 3. Classification Tree Visualization There's one final step to validating our classification tree, which is to run our test set through the model and ensure that accuracy of the model when evaluating the test set isn't too different from the training set. To do this, in Test options, select the Supplied test set radio button and click Set. Choose the file bmw-test.arff, which contains 1,500 records that were not in the training set we used to create the model. When we click Start this time, WEKA will run this test data set through the model we already created and let us know how the model did. Let's do that, by clicking Start. Below is the output. Vinod Gupta School of Management, IIT Kharagpur 9
  • 10. Listing 2.Output from WEKA’s classification model of Test Data Comparing the "Correctly Classified Instances" from this test set (90.5 percent) with the "Correctly Classified Instances" from the training set (92.3333 percent), we see that the accuracy of the model is pretty close, which indicates that the model will not break down with unknown data, or when future data is applied to it. Vinod Gupta School of Management, IIT Kharagpur 10
  • 11. Cluster Analysis Question: "What age groups more likely to buy Personal Equity Plan?" The data can be mined to compare the age of the purchaser of past PEP . From this data, it could be found whether certain age groups (22-30 year olds, for example) have a higher propensity to to go for PEP. The data, when mined, will tend to cluster around certain age groups and certain colors, allowing the user to quickly determine patterns in the data. Load the data file Bank_data.CSV into WEKA using the same steps we used to load data into the Preprocess tab. Take a few minutes to look around the data in this tab. Look at the columns, the attribute data, the distribution of the columns, etc. Your screen should look like Figure 4 after loading the data. Figure 4. Bank cluster data in Weka With this data set, we are looking to create clusters, so instead of clicking on the Classify tab, click on the Cluster tab. Click Choose and select SimpleKMeans from the choices that appear (this will be our preferred method of clustering for this article). Vinod Gupta School of Management, IIT Kharagpur 11
  • 12. Finally, we want to adjust the attributes of our cluster algorithm by clicking SimpleKMeans . The only attribute of the algorithm we are interested in adjusting here is the numClusters field, which tells us how many clusters we want to create. Let's change the default value of 2 to 5 for now, but keep these steps in mind later if you want to adjust the number of clusters created. Your WEKA Explorer should look like Figure 5 at this point. Click OK to accept these values. Figure 5. Cluster Attributes At this point, we are ready to run the clustering algorithm. Remember that 100 rows of data with five data clusters would likely take a few hours of computation with a spreadsheet, but WEKA can spit out the answer in less than a second. Your output should look like Listing 3. Vinod Gupta School of Management, IIT Kharagpur 12
  • 13. Listing 3. Cluster Output with 5 clusters Vinod Gupta School of Management, IIT Kharagpur 13
  • 14. Listing 4. Cluster Output with 10 Clusters Clusters One thing that is clear from the clusters is that behavior of Male are clustered in only 2-3 groups while females behavior are heavily distributed among 7 clusters, so preparing an offering for a specific Description of Clusters- Cluster 0- This group consists of unmarried, mid-income earning females in their early 40’s who live in rural areas. They have on an average two children, no car and personal equity plan but they do have savings and current account. Cluster 1- This group consists of married, high-income earning females in their late 40’s who live in rural areas. They have on an average two children,no car and personal equity plan but they do have savings and current account. Cluster 2- This group consists of married, low-income earning females in their early 40’s who live in inner city. They have on an average one child, no car and savings account but they do have current account and personal equity plan. Vinod Gupta School of Management, IIT Kharagpur 14
  • 15. Cluster 3- This group consists of married, low-income earning females in their early 30’s who live in town. They have on an average one or two children, no car, savings account and personal equity plan but they do have current account. Cluster 4- This group consists of married, mid-income earning males in their late 30’s who live in inner city. They have on an average one or no child, no savings account but they do have personal equity plan, savings & current account. Cluster 5- This group consists of unmarried, high-income earning males in their early 40’s who live in town. They have on an average one or no child, they have car, personal equity plan, savings & current account. Cluster 6- This group consists of married, mid-income earning females in their early 40’s who live in inner city. They mostly don’t have ant child, they do not have any savings account and personal equity plan but they do have current account. Cluster 7- This group consists of unmarried, high-income earning females in their mid 40’s who live in inner city. They have on an average one or two child, no car and personal equity plan but they do have savings & current account. Cluster 8- This group consists of unmarried, high-income earning females in their mid 40’s who live in town. They have on an average one or no child, no personal equity plan but they do have car, savings & current account. Cluster 9- This group consists of married, mid-income earning males in their early 40’s who live in inner city. They have on an average one or two children, no car, personal equity plan and current account but they do have savings account. Vinod Gupta School of Management, IIT Kharagpur 15
  • 16. One other interesting way to examine the data in these clusters is to inspect it visually. To do this, you should right-click on theResult List section of the Cluster tab . One of the options from this pop-up menu is Visualize Cluster Assignments. A window will pop up that lets you play with the results and see them visually. For this example, change the X axis to be income (Num), the Y axis to children (Num), and the Color to Cluster (Nom). This will show us in a chart how the clusters are grouped in terms of income and no’ of children. Also, turn up the "Jitter" to about three-fourths of the way maxed out, which will artificially scatter the plot points to allow us to see them more easily. Figure 6. Cluster Visual Inspection Vinod Gupta School of Management, IIT Kharagpur 16
  • 17. Other Applications of Weka •DISCRETIZATION •REGRESSION •NEAREST NEIGHBOR References https://www.ibm.com/developerworks/opensource/library/os-weka2/ http://maya.cs.depaul.edu/classes/ect584/weka/preprocess.html http://www.cs.waikato.ac.nz/~ml/weka/ Vinod Gupta School of Management, IIT Kharagpur 17