Docsity

Classification using Regression-Data Warehouse-Lab Mannual, Lecture notes of Data Warehousing

Toggle sidebar
bg1
Classification using Regression
Download the data set house.arff and load it into
Weka as usual.
selecting the houseSize column in the left section
(which should be selected by default), the right-
section should change to show you additional
statistical information about the column. It shows
statistical information about the column. It shows
the maximum value in the data set for this column
is 4,032 square feet, and the minimum is 2,200
square feet. The average size is 3,131 square feet,
with a standard deviation of 655 square feet. Now
use the Visualize tab to explore the data.
Now we have a feel for the data and we will try
fitting a simple linear regression model to the data.
2
docsity.com
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Classification using Regression-Data Warehouse-Lab Mannual and more Lecture notes Data Warehousing in PDF only on Docsity!

Classification using Regression

 Download the data set house.arff and load it into Weka as usual.  selecting the houseSize column in the left section (which should be selected by default), the right- section should change to show you additional statistical information about the column. It showsstatistical information about the column. It shows the maximum value in the data set for this column is 4,032 square feet, and the minimum is 2, square feet. The average size is 3,131 square feet, with a standard deviation of 655 square feet. Now use the Visualize tab to explore the data.  Now we have a feel for the data and we will try fitting a simple linear regression model to the data. 2

Train Regression Model

 On the Classify tab, select Choose > functions > LinearRegression.  In test option select use training set  Finally, the last step to creating our model is to choose the dependent variable. Rightto choose the dependent variable. Right below the test options, there's a combo box that lets you choose the dependent variable. The column sellingPrice should be selected by default. If it's not, please select it.  Click Start.

3

Granite doesn't matter: WEKA will only use columns that statistically contribute to the accuracy of the model.  Bathrooms do matter: Since we use a simple 0 or 1 value for an upgraded bathroom. The model tells

Interpreting Results (01)

1 value for an upgraded bathroom. The model tells us it adds $42,292 to the house value.  Bigger houses reduce the value: WEKA is telling us that the bigger our house is, the lower the selling price. This can be seen by the negative coefficient in front of the houseSize variable. The model is telling us that every additional square foot of the house reduces its price by $ 5

Interpreting Results (02)

 The house size, unfortunately, isn't an independent variable because it's related to the bedrooms variable, which makes sense, since bigger houses tend to have moresince bigger houses tend to have more bedrooms. So our model isn't perfect.

6

New Regression Model

 Linear Regression Model sellingPrice = 7.6975 * lotSize + 25827.5726 * bedrooms + 35874.5517 * bathroom + -21544.

8

Check Accuracy of Model

 To check the accuracy of model  Take a row from the data file  Puts the values of variable in Weka regression model and then compare the result with actual value

  • – (lotSize, bedrooms, bathroom, sellingPrice)(lotSize, bedrooms, bathroom, sellingPrice) =(9365,5,1,230000)
  • sellingPrice = 7.6975 * lotSize + 25827.5726 * bedrooms + 35874.5517 * bathroom + -21544.  Calculated value=215,  Actual value=230, 9