Question: SHOW ALL STEPS AND COMMENT ALL CODE: (a) [marks: 10] Obtain two PCA principal components from the sonar dataset (https://archive.ics.uci.edu/m//machine-learning-databases/undocumented//connectionist-bench/sonar/sonar.all-data) and print the explained variance

SHOW ALL STEPS AND COMMENT ALL CODE:

SHOW ALL STEPS AND COMMENT ALL CODE: (a) [marks: 10] Obtain two

(a) [marks: 10] Obtain two PCA principal components from the sonar dataset (https://archive.ics.uci.edu/m//machine-learning-databases/undocumented//connectionist-bench/sonar/sonar.all-data) and print the explained variance ratio. (b) [marks: 20] Generate a scatter graph of the two principal components. (c) [bonus marks: 5] Embellish your graph by using marker ' ' for mines and marker ' v ' for rocks. (d) [bonus marks: 10] Use KMeans(n_clusters=2, max_iter=100, init='random') to obtain two clusters off the original data (not from the PCA components) and embellish your graph using contour colours splitting the two K-Means clusters. Submit your Python code (either sonar.py or sonar.ipynb; submitting a link to a notebook will be considered a void submission) with your name in the Honour Code at the top of your program. (a) [marks: 10] Obtain two PCA principal components from the sonar dataset (https://archive.ics.uci.edu/m//machine-learning-databases/undocumented//connectionist-bench/sonar/sonar.all-data) and print the explained variance ratio. (b) [marks: 20] Generate a scatter graph of the two principal components. (c) [bonus marks: 5] Embellish your graph by using marker ' ' for mines and marker ' v ' for rocks. (d) [bonus marks: 10] Use KMeans(n_clusters=2, max_iter=100, init='random') to obtain two clusters off the original data (not from the PCA components) and embellish your graph using contour colours splitting the two K-Means clusters. Submit your Python code (either sonar.py or sonar.ipynb; submitting a link to a notebook will be considered a void submission) with your name in the Honour Code at the top of your program

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!