PCA


Work with your assigned partner to write a series of Python scripts to fit Agglomerative clustering, K-Means, and DBSCAN after applying PCA to both the raisin data set and the spam email data set. Make sure to remove the response column for each before applying PCA and clustering.


Make sure to do model selection and random restarts and answer the following questions:

  1. How many clusters are present in the data?
  2. What are their centers?
  3. How many clusters do each model report?
  4. Which models perform best on each data set?
  5. How do the clusters compare the response?


Plot the data with the centers of each cluster according to each model on each data set. Make a 2x2 or 4x1 figure of plots. Color code the points according to their cluster assignment.


This page was last modified on 2026-08-19 at 20:15:10.

Copyright © 2018–2026 George Fox University. All rights reserved.