Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Data Preprocessing Techniques in Weka: A Practical Guide, Study notes of Data Warehousing

Data Warehouse Lab ARFF and CSV formats Preprocessing filters on Weather dataset 1.Add 2.Remove 3.Discretize 4.Replace Missing values 5.Normalize

Typology: Study notes

2023/2024

Available from 11/19/2023

soumya-choudhary-2
soumya-choudhary-2 🇮🇳

1 document

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
EXPERIMENT NO:1
Aim:
Create a dataset using ARFF and CSV formats and load into the Weka Explorer.
Description:
We need to create an Employee Table with training data set which includes attributes like name,
id, salary, experience, gender, phone number.
Procedure:
Steps for creating and loading .arff file.
1) Open Start 🡪All Programs🡪 Accessories🡪Notepad
2) Type the following training data set with the help of Notepad for Employee Table.
@relation employee
@attribute name {x,y,z,a,b}
@attribute id numeric
@attribute salary {low,medium,high}
@attribute exp numeric
@attribute gender {male,female}
@attribute phone numeric
@data
x,101,low,2,male,250311
y,102,high,3,female,251665
z,103,medium,1,male,240238
a,104,low,5,female,200200
b,105,high,2,male,240240
3) After that the file is saved with .arff file format.
4) Minimize the arff file and then open Start 🡪 Programs🡪 weka-3-4.
5) Click on weka-3-4, then Weka dialog box is displayed on the screen.
6) In that dialog box there are four modes, click on Explorer.
7) Explorer shows many options. In that click on ‘open file’ and select the arff file
8) Click on edit button which shows employee table on weka.
Steps for creating and loading CSV file.
1) Start Microsoft Excel and add data to a new spreadsheet. For example, type “32,” “19” and
“8” in cells “A1,” “A2” and “A3,” respectively.
2) Click the “File” tab on the ribbon and then choose “Save As.” Click the arrow next to “Save
as Type” and choose “CSV (Comma Delimited)” from the drop-down list.
3) Change the file name to one you prefer. Select the location to save the file, then click the
pf3
pf4
pf5

Partial preview of the text

Download Data Preprocessing Techniques in Weka: A Practical Guide and more Study notes Data Warehousing in PDF only on Docsity!

EXPERIMENT NO:

Aim: Create a dataset using ARFF and CSV formats and load into the Weka Explorer. Description: We need to create an Employee Table with training data set which includes attributes like name, id, salary, experience, gender, phone number. Procedure: Steps for creating and loading .arff file. 1) Open Start 🡪All Programs🡪 Accessories🡪Notepad 2) Type the following training data set with the help of Notepad for Employee Table. @relation employee @attribute name {x,y,z,a,b} @attribute id numeric @attribute salary {low,medium,high} @attribute exp numeric @attribute gender {male,female} @attribute phone numeric @data x,101,low,2,male, y,102,high,3,female, z,103,medium,1,male, a,104,low,5,female, b,105,high,2,male, 3) After that the file is saved with .arff file format. 4) Minimize the arff file and then open Start 🡪 Programs🡪 weka-3-4. 5) Click on weka-3-4 , then Weka dialog box is displayed on the screen. 6) In that dialog box there are four modes, click on Explorer. 7) Explorer shows many options. In that click on ‘open file’ and select the arff file 8) Click on edit button which shows employee table on weka. Steps for creating and loading CSV file.

  1. Start Microsoft Excel and add data to a new spreadsheet. For example, type “32,” “19” and “8” in cells “A1,” “A2” and “A3,” respectively.
  2. Click the “File” tab on the ribbon and then choose “Save As.” Click the arrow next to “Save as Type” and choose “CSV (Comma Delimited)” from the drop-down list.
  3. Change the file name to one you prefer. Select the location to save the file, then click the

“Save” button. Click "OK" to save.

  1. Open Start 🡪 Programs🡪 weka-3-4.
  2. Click on weka-3-4 , then Weka dialog box is displayed on the screen.
  3. In that dialog box there are four modes, click on Explorer.
  4. Explorer shows many options. In that click on ‘open file’ and select the csv file
  5. Click on edit button which shows employee table on weka. Result: This program has been successfully executed. EXPERIMENT NO: 2 Aim: Perform the following preprocessing filters on 'Weather' dataset. (i) Add (ii) Remove (iii) Discretize (iv) Replace Missing values (v) Normalize Creation of Weather Table: Procedure:

Add 🡪 Pre-Processing Technique: Procedure: 1) Start🡪 Programs 🡪 Weka-3-4 🡪Weka-3- 2) Click on explorer. 3) Click on open file. 4) Select Weather.arff file and click on open. 5) Click on Choose button and select the Filters option. 6) In Filters, we have Supervised and Unsupervised data. 7) Click on Unsupervised data. 8) Select the attribute Add. 9) A new window is opened. 10) In that we enter attribute index, type, data format, nominal label values for Climate. 11) Click on OK. 12) Press the Apply button , then a new attribute is added to the Weather Table. 13) Save the file. 14) Click on the Edit button , it shows a new Weather Table on Weka.

Weather Table after adding new attribute CLIMATE: Remove Pre-Processing Technique: Procedure: 1) Start 🡪All Programs 🡪 Weka-3- 2) Click on Explorer. 3) Click on open file. 4) Select Weather.arff file and click on open. 5) Click on Choose button and select the Filters option. 6) In Filters, we have Supervised and Unsupervised data. 7) Click on Unsupervised data. 8) Select the attribute Remove. 9) Select the attributes windy, play to Remove. 10) Click Remove button and then Save. 11) Click on the Edit button , it shows a new Weather Table on Weka.

Weather Table after Normalizing TEMPARATURE, HUMIDITY: Result: This program has been successfully executed.