Skip to content

SahithM2006/EXNO-3-DS

 
 

Repository files navigation

EXNO-3-DS

AIM:

To read the given data and perform Feature Encoding and Transformation process and save the data to a file.

ALGORITHM:

STEP 1:Read the given Data. STEP 2:Clean the Data Set using Data Cleaning Process. STEP 3:Apply Feature Encoding for the feature in the data set. STEP 4:Apply Feature Transformation for the feature in the data set. STEP 5:Save the data to the file.

FEATURE ENCODING:

  1. Ordinal Encoding An ordinal encoding involves mapping each unique label to an integer value. This type of encoding is really only appropriate if there is a known relationship between the categories. This relationship does exist for some of the variables in our dataset, and ideally, this should be harnessed when preparing the data.
  2. Label Encoding Label encoding is a simple and straight forward approach. This converts each value in a categorical column into a numerical value. Each value in a categorical column is called Label.
  3. Binary Encoding Binary encoding converts a category into binary digits. Each binary digit creates one feature column. If there are n unique categories, then binary encoding results in the only log(base 2)ⁿ features.
  4. One Hot Encoding We use this categorical data encoding technique when the features are nominal(do not have any order). In one hot encoding, for each level of a categorical feature, we create a new variable. Each category is mapped with a binary variable containing either 0 or 1. Here, 0 represents the absence, and 1 represents the presence of that category.

Methods Used for Data Transformation:

1. FUNCTION TRANSFORMATION

• Log Transformation • Reciprocal Transformation • Square Root Transformation • Square Transformation

2. POWER TRANSFORMATION

• Boxcox method • Yeojohnson method

CODING AND OUTPUT:

Screenshot 2024-11-17 213731 Screenshot 2024-11-17 213809 Screenshot 2024-11-17 213828 Screenshot 2024-11-17 213845 Screenshot 2024-11-17 213905 Screenshot 2024-11-17 214025 Screenshot 2024-11-17 214044 Screenshot 2024-11-17 214109 Screenshot 2024-11-17 214129 Screenshot 2024-11-17 214146 Screenshot 2024-11-17 214200 Screenshot 2024-11-17 214214 Screenshot 2024-11-17 214234 Screenshot 2024-11-17 214247 Screenshot 2024-11-17 214302 Screenshot 2024-11-17 214319 Screenshot 2024-11-17 214334 Screenshot 2024-11-17 214351 Screenshot 2024-11-17 214405 Screenshot 2024-11-17 214419 Screenshot 2024-11-17 214435 Screenshot 2024-11-17 214557 Screenshot 2024-11-17 214707 Screenshot 2024-11-17 215415 Screenshot 2024-11-17 215459

RESULT:

Thus the given data, Feature Encoding, Transformation process and save the data to a file was performed successfully

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 84.2%
  • Python 15.8%