Factor Analysis
Factor Analysis
Hands On - 2
[email protected]
+91-7022374614
US: 1-800-216-8930(Toll Free)
Data Science with Python Certification Course
Step 4: Import all the required modules by typing the following code in the notebook and run it
by pressing shift + enter
Step 7: Split the data into 70 percent for training and 30 percent testing.
Step 9: Create a RandomForestCLassifier train it on scaled data and print its accuracy score and
confusion matrix.
Step 10: Create a RandomForestCLassifier train it on scaled and transformed data and print its
accuracy score and confusion matrix.
Step 12: Call the perform_pca method with n_components set to a number from 1 to 4 and
print their confusion matrix and accuracy scores.