Question: Objective : Feature Selection and Dimensionality Reduction Question: Can Principal Component Analysis (PCA) effectively reduce the number of features in the dataset while preserving 90%

Objective : Feature Selection and Dimensionality Reduction

Question: Can Principal Component Analysis (PCA) effectively reduce the number of features in the dataset while preserving 90% of the variance to simplify the classification model? Use python scripting to the problem

import matplotlib.pyplot as pltimport numpy as np import pandas as pd df = pd.read_csv('student_prediction.csv')df.head()
Objective : Feature Selection and Dimensionality
RangeIndex: 145 entries, 0 to 144 Data columns (total 33 columns ) : # Column Non-Null Count Dtype - - - studentid 145 non-null int32 1 age 145 non-null int32 2 gender 145 non-null int32 hs_type 145 non-null int32 4 scholarship 145 non-null int32 5 work 145 non-null int32 6 activity 145 non-null int32 partner 145 non-null int32 salary 145 non-null int32 transport 145 non-null int32 10 living 145 non-null int32 11 mother_edu 145 non-null int32 12 father_edu 145 non-null int32 13 #_siblings 145 non-null float64 14 kids 145 non-null int32 15 mother_job 145 non-null int32 16 father_job 145 non-null int32 17 study_hrs 145 non-null int32 18 read_freq 145 non-null int32 19 read_freq_sci 145 non-null int32 20 attend_dept 145 non-null int32 21 impact 145 non-null int32 22 attend 145 non-null int32 23 prep_study 145 non-null int32 24 prep_exam 145 non-null int32 25 notes 145 non-null int32 26 listens 145 non-null int32 27 likes_discuss 145 non-null int32 28 classroom 145 non-null int32 29 cuml_gpa 145 non-null int32 30 exp_gpa 145 non-null int32 31 course id 145 non-null float64 32 grade 145 non-null float64 dtypes : float64(3), int32(30)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!