1
0

trying to look at the pca_plot 3

This commit is contained in:
mgaughan 2025-09-02 16:04:06 -05:00
parent dc23065cc8
commit a36226eab9
3 changed files with 20 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 KiB

View File

@ -1,5 +1,5 @@
starting the job at: Tue Sep 2 15:53:08 CDT 2025
starting the job at: Tue Sep 2 16:02:22 CDT 2025
setting up the environment
running the neurobiber labeling script
job finished, cleaning up
job pau at: Tue Sep 2 15:53:21 CDT 2025
job pau at: Tue Sep 2 16:02:32 CDT 2025

View File

@ -5,6 +5,7 @@ import pandas as pd
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
def format_df_data(df):
@ -33,3 +34,20 @@ if __name__ == "__main__":
plt.colorbar()
plt.savefig("090225_biber_pca_plot.png", dpi=300)
plot_df = pd.DataFrame({
"PC1": biber_vecs_pca[:, 0],
"PC2": biber_vecs_pca[:, 1],
"AuthorWMFAffil": biber_vec_df["AuthorWMFAffil"].astype(str)
})
plt.figure(figsize=(8,6))
sns.scatterplot(
data=plot_df, x="PC1", y="PC2", hue="AuthorWMFAffil",
palette="tab10", s=40, alpha=0.7, edgecolor=None
)
plt.xlabel('component 1')
plt.ylabel('component 2')
plt.legend(title='AuthorWMFAffil', bbox_to_anchor=(1.05, 1), loc=2)
plt.tight_layout()
plt.savefig("biber_pca_affil.png", dpi=300)
plt.show()