Weka term paper(siddharth 10 bm60086)


Published on

Comparing Colleges on basis of various attributes and doing regression using Weka Software
Demonstration of Clustering using Weka on various attributes on data set of places.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Weka term paper(siddharth 10 bm60086)

  1. 1. Data mining technique using WEKA IT for Business Intelligence Submitted By:- Siddharth Verma 10BM60086
  2. 2. WEKAData mining isnt solely the domain of big companies and expensive software. In fact, theres apiece of software that does almost all the same things as these expensive pieces of software —the software is called WEKA. WEKA is the product of the University of Waikato (New Zealand)and was first implemented in its modern form in 1997. It uses the GNU General Public License(GPL). The software is written in the Java™ language and contains a GUI for interacting withdata files and producing visual results (think tables and curves). Its Java-based, so if we donthave a JRE installed on your computer, download the WEKA version that contains the JRE, aswell.To load data into WEKA, we have to put it into a format that will be understood. WEKAspreferred method for loading data is in the Attribute-Relation File Format (ARFF), where we candefine the type of data being loaded, thensupply the data itself.When we start WEKA, the GUI chooserpops up as shown in figureIt lets us choose four ways to work withWEKA and our data. The four ways are  Explorer  Experimenter  Knowledge Flow  Simple CLIREGRESSIONRegression is the easiest technique to use, but is also probably the least powerful. In effect,regression models all fit the same general pattern. There are a number of independentvariables, which, when taken together, produce a result — a dependent variable. Theregression model is then used to predict the result of an unknown dependent variable, giventhe values of the independent variables.We will perform Regression on the Colleges data comparing them on basis of various attributes.Various attributes are:-  School: Contains the name of each school
  3. 3.  School_Type: Coded LibArts for liberal arts and Univ for university  SAT: Median combined Math and Verbal SAT score of students  Acceptance: % of applicants accepted  $/Student: Money spent per student in dollars  Top 10%: % of students in the top 10% of their h.s. graduating class  %PhD: % of faculty at the institution that have PhD degrees  Grad%: % of students at institution who eventually graduateTo create our regression model, start WEKA, then choose the Explorer. In the Explorer screen,select the Preprocess tab. Select the Open File button and select the ARFF file. After selecting thefile the explorer window looks as belowIn the left section of the Explorer window, it outlines all of the columns in the data (Attributes)and the number of rows of data supplied (Instances). By selecting each column, the rightsection of the Explorer window will also give the information about the data in that column ofthe data set. For example, by selecting the SAT column in the left section the right-sectionshould change to show the additional statistical information about the column. Finally, theresa visual way of examining the data, which can be viewed by clicking the Visualize All button.
  4. 4. To create the model, click on the Classify tab. The first step is to select the model we want tobuild, so WEKA knows how to work with the data, and how to create the appropriate model: 1. Click the Choose button, then expand the functions branch. 2. Select the LinearRegression leaf.This tells WEKA that we want to build a regression model.
  5. 5. Though it may be obvious to us that we want to use the data we supplied in the ARFF file, thereare actually different options than what well be using. The other three choices are Suppliedtest set, where we can supply a different set of data to build the model;Cross-validation, whichlets WEKA build a model based on subsets of the supplied data and then average them out tocreate a final model; and Percentage split, where WEKA takes a percentile subset of thesupplied data to build a final model. With regression, we can simply choose Use training set.Finally, Choosing no attribute method to determine each attributes contribution to regression.The last step to creating our model is to choose the dependent variable one by one allnumerical attributes.
  6. 6. Right below the test options, theres a combo box that lets you choose the dependent variable.Choosing SAT as dependent variable .To create our model, click Start. Figure below shows theoutput windowINTERPRETATION OF THE RESULT:SAT = ……..+ (30.6632* School) + (-1.245* School type) + (0.0609* Acceptance) + (0.0341* Top) +(0.064* 10%) +(0.1479* PHD%) – 1089.2569Interpreting the pattern and conclusion that our model generated we see that besides just astrict house value:  SAT affects choice of School — WEKA tells us that Sat score affects choice of school the most  School Type do not matter — Since we use a simple 0 or 1 value for an upgraded bathroom, we can use the coefficient from the regression model to determine the value of an upgraded bathroom on the house value.  SAT score has no correlation with money spent per student. — WEKA will only use columns that statistically contribute to the accuracy of the model. It will throw out and ignore columns that dont help in creating a good model. So this regression model is telling us that no effect of SAT score on relation with $ spent on students.
  7. 7. CLUSTERINGClustering is the task of assigning a set of objects into groups (called clusters) so that theobjects in the same cluster are more similar (in some sense or another) to each other than tothose in other clusters. WEKA offers clustering capabilities not only as standalone schemes, butalso as filters and classifiers.To begin with clustering we will use the data set of places. The data set contains placesclassified on bases of – The nine rating criteria used by Places Rated Almanac are:Climate & Terrain, Housing, Health Care & Environment, Crime, Transportation, Education, TheArts, Recreation and EconomicsTo create clustering, start WEKA, then choose the Explorer. In the Explorer screen, selectthe Preprocess tab. Select the Open File button and select the ARFF file. After selecting the filethe explorer window looks as belowTo perform clustering, select the "Cluster" tab in the Explorer and click on the "Choose" button.This results in a drop down list of available clustering algorithms. In this case select"SimpleKMeans". Next, click on the text box to the right of the "Choose" button to get the pop-up window shown in Figure below, for editing the clustering parameter.
  8. 8. In the pop-up window we enter 5 as the number of clusters (instead of the default values of 2)and we leave the value of "seed" as is. The seed value is used in generating a random numberwhich is, in turn, used for making the initial assignment of instances to clusters.Once the options have been specified, we can run the clustering algorithm. Here we make surethat in the "Cluster Mode" panel, the "Use training set" option is selected, and we click "Start".We can right click the result set in the "Result list" panel and view the results of clustering in aseparate window.We can choose the cluster number and any of the other attributes for each of the threedifferent dimensions available (x-axis, y-axis, and color).
  9. 9. Different combinations of choices will result in a visual rendering of different relationshipswithin each cluster.INTERPRETING THE RESULT:Each cluster shows us a type of behavior in our customers, from which we can begin to drawsome conclusions:Cluster 0: Transportation facility is best in this place and it excels in educations as well. This place is richin arts and recreations as well.Cluster 1: This place has least crime. Relatively low utility bills, property taxes, mortgage paymentsmakes it favorable place to live in.Cluster 2: This place has highest violent crime rate and property crime rate. People in this place have topay highest utility bills, property taxes, mortgage payments but it has best climate and terrain and besthealth care and environment too. Transport facilities are also good. This place is rich in arts andrecreations various venues are available which are best in categories.Cluster 3: This place has least utility bills, property taxes, mortgage payments and therefore favorable.Transport facilities are in bad shape. Little or no avenues of arts and recreation available. Lowestaverage household income among all.Cluster 4: This place has high crime rate. Health care and Environment is worse among all places and soare education facilities. Highest average household income among all.