0% found this document useful (0 votes)
8 views8 pages

Lab Sheet 02

This document provides instructions for normalizing data using Weka. It discusses two types of normalization: 1) Min-max normalization, which scales attributes to fall within a specified range like 0-1, and 2) Z-score normalization, which standardizes attributes to have a mean of 0 and standard deviation of 1. It then walks through steps to apply each type of normalization to the weather.numeric dataset in Weka, showing the effects on the temperature and humidity attributes.

Uploaded by

bluengray55
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views8 pages

Lab Sheet 02

This document provides instructions for normalizing data using Weka. It discusses two types of normalization: 1) Min-max normalization, which scales attributes to fall within a specified range like 0-1, and 2) Z-score normalization, which standardizes attributes to have a mean of 0 and standard deviation of 1. It then walks through steps to apply each type of normalization to the weather.numeric dataset in Weka, showing the effects on the temperature and humidity attributes.

Uploaded by

bluengray55
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Lab Sheet 02

Objective - Data Normalization by Using Weka

Normalization

Normalization is used to scale the data of an attribute so that it falls in a smaller range, such as
-1.0 to 1.0 or 0.0 to 1.0. It is generally useful for classification algorithms.

Normalization is generally required when we are dealing with attributes on a different scale,
otherwise, it may lead to a dilution in the effectiveness of an important equally important
attribute (on a lower scale) because of other attributes having values on a larger scale.

We will discuss two types of normalization in this lab session

1) Min-max normalization
2) Z- Score

Step 1 -

Go to C:\Program Files\Weka-3-8-6\data and open weather. numeric.arff file.

Data set description

● 5 attributes
1. outlook {sunny, overcast, rainy} --> Nominal
2. temperature → Numerial
3. humidity → Numerical
4. windy {TRUE, FALSE} --> Nominal
5. play {yes, no} --> Nomina
● No missing Values
● 14 instances

Step 2 - Apply Normalization

1) Min-max normalization

Guarantees all features will have the exact same scale but does not handle outliers well.

Go to filter → weka → filters → unsupervised → attributes → Normalize

In the Normalize filter by default, the resulting values are in [0,1] for the data used to
compute the normalization intervals. But the scale & translation parameters can change.

Eg - Scale 3, translation -1.0 —---> [-1,+2]

Getting values in the range [-1,+1]

Translation - The starting minimum vale

Scale - The Difference between max and min

Click on the white space in front of the selected filter and you will get the below
parameter panel
Do not change as it is. And then ok.

We knew that to apply normalization to our dataset, the dataset should have numerical
attributes that we need to scale within a given range.

In this selected dataset we have 2 numerical attributes.

1. temperature → Numerial
2. humidity → Numerical

Then Click on apply which is in front of the filter option

1. Temperature

Before apply
After apply

2. Humidity

Before apply
After apply

Then go to edit and view the dataset. We can see the dataset is normalized.
2) Z- Score

In this, we consider about mean and standard deviation.

Z-score normalization is a strategy of normalizing data that avoids this outlier issue.

But does not produce normalized data with the exact same scale.

Close explorer

And open weather. numeric.arff file as mentioned in Step 1

Then Go to filter → weka → filters → unsupervised → attributes → Standardize

This filter standardizes all numerical attributes in the given dataset to have zero mean and
unit variation(apart from the class attribute)

Click on the white space in front of the selected filter and you will get the below
parameter panel. Don’t change the default settings

Then click on apply.

1. Temperature

Before apply
After applying

2. Humidity

Before apply

After apply

You might also like