Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

For this project, we created a way for the user to perform primary component analysis on the data. That is to say, we allow them to choose which header's columns (2 or more) to analyze, and we create corresponding eigenvectors which we project the data onto and let the user view. The first two or three eigenvectors become the new bases/axes of the data, and we save each analysis so the user can later plot any of them from the list of choices. My program lets the user make any number of PCA from an open file, and the user can then open a window that lets them plot the PCA or look at its eigenvectors and other info. I also allow the user to name their analysis if they so choose (the default name is a list of chosen headers).

The first task was to make a window where the user can choose which headers to use in the PCA. I made a class called PCASelection that has a listbox of all the headers, which I get from the opened data, and then the user can select multiple headers to use before hitting ok. I get all of the selected indices and make a new PCAData object with the appropriate headers based on the choice. Then I store this data in a list in the display class, which I will use to access info about individual analyses later. Each PCAData instance is made using the analysis class's method called pca. In this method, I follow the structure of the provided code to get the data projected onto its first three eigenvectors, which I store in the PCAData instance I return. When it's time to plot this on the canvas, I normalize it again in buildPCAPoints, which I call from the apply method of the PCAView class window. The task also calls for the user to be able to delete an analysis. To do this, I just added a delete button, and if the user presses it with one or more highlighted items, I call the listbox method delete() on the index/indices, and delete the corresponding data from the list of PCA, too.

  • No labels