Hi Sarah On 2015-02-07 16:56:22, Sarah Mount <mount.sa...@gmail.com> wrote: > df_no_strings = df.drop("Sample", axis=1, inplace=False) pca = > PCA(n_components=4) pca.fit(df_no_strings) print("Explained > variance:", pca.explained_variance_) df_reduced = > pca.fit_transform(df_no_strings) > > I want to plot the results of performing PCA as a scatter plot, > similarly to Figure 3 on Page 10 of this document: > > http://www.dacapobench.org/dacapo-TR-CS-06-01.pdf > > Is there an easy way to do this, given that I have lost the > first column of the data frame?
If I understand correctly, you can grab the "sample" column and use it to add custom labels to your data-points: http://stackoverflow.com/questions/5147112/matplotlib-how-to-put-individual-tags-for-a-scatter-plot Regards Stéfan ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general