Dimensionality Reduction using PCA and tSNE


Objective:


The objective of this problem is to explore the data and reduce the number of features by using dimensionality reduction techniques like PCA and TSNE and generate meaningful insights.


Dataset:


There are 8 variables in the data:

Importing necessary libraries and overview of the dataset

Loading data

Check the info of the data

Observations:

Data Preprocessing and Exploratory Data Analysis

Checking values in horsepower column

Observations:

Summary Statistics

Step 1:

Observations:

Let's check the distribution and outliers for each column in the data

Step 2:

Observations:

Checking correlation

Observations:

Scaling the data

Principal Component Analysis

Step 3:

Observations:

Step 4: Interpret the coefficients of three principal components from the dataframe

Observations:

We can also visualize the data in 2 dimensions using first two principal components

Let's try adding hue to the scatter plot

Step 5:

Observations:

t-SNE

Step 6:

Observations:

Step 7:

Observations: