SlideShare a Scribd company logo
6
Most read
7
Most read
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

More Related Content

What's hot (20)

PPTX
Handling and Processing Big Data
Umair Shafique
 
PDF
Heart disease prediction
Ariful Haque
 
PPTX
HEALTH PREDICTION ANALYSIS USING DATA MINING
Ashish Salve
 
PDF
Decision trees & random forests
SC5.io
 
PPTX
Support vector machine-SVM's
Anudeep Chowdary Kamepalli
 
PDF
Introduction To Data Science
Spotle.ai
 
PDF
Master Class: GANS with Applications in Synthetic Data Generation
QuantUniversity
 
PPTX
Predictive Analysis of Breast Cancer Detection using Classification Algorithm
Sushanti Acharya
 
PDF
Feature Engineering
HJ van Veen
 
PPTX
Machine Learning for Disease Prediction
Mustafa Oğuz
 
PDF
Isolation Forest
Konkuk University, Korea
 
PPTX
Data Exploration.pptx
PerumalPitchandi
 
PDF
Cluster Analysis for Dummies
Venkata Reddy Konasani
 
PPTX
Loan prediction
Akshay Jadhav
 
PPT
Support Vector machine
Anandha L Ranganathan
 
PPTX
weka data mining
kalthoom almaqbali
 
PDF
Anomaly detection (Unsupervised Learning) in Machine Learning
Kuppusamy P
 
PPTX
Big data clustering
Jagadeesan A S
 
PPTX
Housing price prediction
Abhimanyu Dwivedi
 
PPTX
Machine learning clustering
CosmoAIMS Bassett
 
Handling and Processing Big Data
Umair Shafique
 
Heart disease prediction
Ariful Haque
 
HEALTH PREDICTION ANALYSIS USING DATA MINING
Ashish Salve
 
Decision trees & random forests
SC5.io
 
Support vector machine-SVM's
Anudeep Chowdary Kamepalli
 
Introduction To Data Science
Spotle.ai
 
Master Class: GANS with Applications in Synthetic Data Generation
QuantUniversity
 
Predictive Analysis of Breast Cancer Detection using Classification Algorithm
Sushanti Acharya
 
Feature Engineering
HJ van Veen
 
Machine Learning for Disease Prediction
Mustafa Oğuz
 
Isolation Forest
Konkuk University, Korea
 
Data Exploration.pptx
PerumalPitchandi
 
Cluster Analysis for Dummies
Venkata Reddy Konasani
 
Loan prediction
Akshay Jadhav
 
Support Vector machine
Anandha L Ranganathan
 
weka data mining
kalthoom almaqbali
 
Anomaly detection (Unsupervised Learning) in Machine Learning
Kuppusamy P
 
Big data clustering
Jagadeesan A S
 
Housing price prediction
Abhimanyu Dwivedi
 
Machine learning clustering
CosmoAIMS Bassett
 

Similar to Classification and Clustering Analysis using Weka (20)

PPSX
Data Mining GUI Tools with Demo
praeeth palliyaguru
 
PDF
Data Mining Techniques using WEKA_Saurabh Singh_10BM60082
Saurabh Singh
 
PDF
DATA MINING on WEKA
satyamkhatri
 
PDF
Weka_Manual_Sagar
Sagar Kumar
 
PDF
weka-190429184259.pdf
TeamRebel1
 
PPTX
Weka presentation
Abrar ali
 
DOC
Data mining techniques using weka
Prashant Menon
 
PDF
Data Mining Techniques using WEKA (Ankit Pandey-10BM60012)
Ankit Pandey
 
PPTX
Business intelligence and data warehousing
Vaishnavi
 
PPTX
Weka_new_forthedataming_practicalss.pptx
harshthakor2309
 
PDF
wekapresentation-130107115704-phpapp02.pdf
Dr. Rajesh P Barnwal
 
PDF
Itb weka nikhil
nikhilyagnic
 
PDF
Weka project - Classification & Association Rule Generation
rsathishwaran
 
PPT
Shraddha weka
shraddha18
 
PPT
Shraddha weka
shraddha18
 
PPTX
A simple introduction to weka
Pamoda Vajiramali
 
DOCX
Data Mining _ Weka
Ramya Krishna Puttur
 
PPT
Weka : A machine learning algorithms for data mining
Keshab Kumar Gaurav
 
DOCX
Weka_10BM60025_VGSOM
Divya Hamirwasia
 
DOCX
Weka Term Paper_VGSoM_10BM60011
Amu Singh
 
Data Mining GUI Tools with Demo
praeeth palliyaguru
 
Data Mining Techniques using WEKA_Saurabh Singh_10BM60082
Saurabh Singh
 
DATA MINING on WEKA
satyamkhatri
 
Weka_Manual_Sagar
Sagar Kumar
 
weka-190429184259.pdf
TeamRebel1
 
Weka presentation
Abrar ali
 
Data mining techniques using weka
Prashant Menon
 
Data Mining Techniques using WEKA (Ankit Pandey-10BM60012)
Ankit Pandey
 
Business intelligence and data warehousing
Vaishnavi
 
Weka_new_forthedataming_practicalss.pptx
harshthakor2309
 
wekapresentation-130107115704-phpapp02.pdf
Dr. Rajesh P Barnwal
 
Itb weka nikhil
nikhilyagnic
 
Weka project - Classification & Association Rule Generation
rsathishwaran
 
Shraddha weka
shraddha18
 
Shraddha weka
shraddha18
 
A simple introduction to weka
Pamoda Vajiramali
 
Data Mining _ Weka
Ramya Krishna Puttur
 
Weka : A machine learning algorithms for data mining
Keshab Kumar Gaurav
 
Weka_10BM60025_VGSOM
Divya Hamirwasia
 
Weka Term Paper_VGSoM_10BM60011
Amu Singh
 
Ad

Recently uploaded (20)

PPTX
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PPSX
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 
PPTX
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
PPTX
grade 5 lesson ENGLISH 5_Q1_PPT_WEEK3.pptx
SireQuinn
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PPSX
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PDF
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
PPTX
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PDF
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
PPTX
Quarter1-English3-W4-Identifying Elements of the Story
FLORRACHELSANTOS
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PPTX
Pyhton with Mysql to perform CRUD operations.pptx
Ramakrishna Reddy Bijjam
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PPTX
BANDHA (BANDAGES) PPT.pptx ayurveda shalya tantra
rakhan78619
 
PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 
How to Create a PDF Report in Odoo 18 - Odoo Slides
Celine George
 
grade 5 lesson ENGLISH 5_Q1_PPT_WEEK3.pptx
SireQuinn
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
HEALTH ASSESSMENT (Community Health Nursing) - GNM 1st Year
Priyanshu Anand
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
Chapter-V-DED-Entrepreneurship: Institutions Facilitating Entrepreneurship
Dayanand Huded
 
MENINGITIS: NURSING MANAGEMENT, BACTERIAL MENINGITIS, VIRAL MENINGITIS.pptx
PRADEEP ABOTHU
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
CEREBRAL PALSY: NURSING MANAGEMENT .pdf
PRADEEP ABOTHU
 
Quarter1-English3-W4-Identifying Elements of the Story
FLORRACHELSANTOS
 
Dimensions of Societal Planning in Commonism
StefanMz
 
Pyhton with Mysql to perform CRUD operations.pptx
Ramakrishna Reddy Bijjam
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
BANDHA (BANDAGES) PPT.pptx ayurveda shalya tantra
rakhan78619
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
Ad

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