From 5f157ef53281698d556a7275c673b8871d316cd6 Mon Sep 17 00:00:00 2001 From: Matthew Gaughan Date: Thu, 2 Oct 2025 09:22:36 -0700 Subject: [PATCH] some updates to PCA --- mgaughan-rstudio-server_29944433.out | 17 ----------------- p2/quest/neurobiber_PCA_analysis.R | 26 ++++++++++++++------------ 2 files changed, 14 insertions(+), 29 deletions(-) delete mode 100644 mgaughan-rstudio-server_29944433.out diff --git a/mgaughan-rstudio-server_29944433.out b/mgaughan-rstudio-server_29944433.out deleted file mode 100644 index 69c10fd..0000000 --- a/mgaughan-rstudio-server_29944433.out +++ /dev/null @@ -1,17 +0,0 @@ -1. SSH tunnel from your workstation using the following command: - - ssh -N -L 8787:n3441:52613 mjilg@klone.hyak.uw.edu - - and point your web browser to http://localhost:8787 - -2. log in to RStudio Server using the following credentials: - - user: mjilg - password: YBcIVAgxBCfkvg2tbQqI - -When done using RStudio Server, terminate the job by: - -1. Exit the RStudio Session ("power" button in the top right corner of the RStudio window) -2. Issue the following command on the login node: - - scancel -f 29944433 diff --git a/p2/quest/neurobiber_PCA_analysis.R b/p2/quest/neurobiber_PCA_analysis.R index e05c8da..df7a7ec 100644 --- a/p2/quest/neurobiber_PCA_analysis.R +++ b/p2/quest/neurobiber_PCA_analysis.R @@ -57,12 +57,12 @@ discussion_anova_results # look at the representative comments for PC1 and PC2 top5 <- neurobiber_subcomment_pca_df %>% - arrange(desc(PC2)) %>% + arrange(desc(PC6)) %>% slice(300:310) %>% pull(cleaned_comment) bottom5 <- neurobiber_subcomment_pca_df %>% - arrange(PC2) %>% + arrange(PC6) %>% slice(300:310) %>% pull(cleaned_comment) @@ -87,23 +87,25 @@ neurobiber_subcomment_pca_df_x <- neurobiber_subcomment_pca_df %>% neurobiber_description_pca_df %>% select(TaskPHID, priority), by = "TaskPHID" - ) |> - filter(priority.y %in% c("Lowest","Unbreak Now!")) + ) -neurobiber_description_pca_df <- neurobiber_description_pca_df |> +neurobiber_description_pca_df_x <- neurobiber_description_pca_df |> filter(priority %in% c("Lowest","Unbreak Now!")) #unified_df$AuthorWMFAffil <- factor(unified_df$AuthorWMFAffil, levels = c("False", "True")) #unified_df <- unified_df[order(unified_df$AuthorWMFAffil), ] -ggplot(neurobiber_description_pca_df, aes(x = PC3, y = PC8, fill = priority)) + - geom_point(shape = 21, alpha=0.4, size=2) + +# geom_point(shape = 21, alpha=0.4, size=2) + +# geom_bin_2d() + +ggplot(neurobiber_descriptions_pca_df, aes(x = PC4, y = PC1, fill = pair_in_description)) + facet_grid(source ~ phase, scales="fixed") + - xlim(-10, 10) + - ylim(-10, 10) + + geom_point(shape = 21, alpha=0.1, size=2) + + geom_smooth() + + xlim(-5, 5) + + ylim(-5, 5) + scale_fill_viridis_d() + # Or scale_fill_brewer/palette of your choice theme_minimal() + labs( - title = "PCs for Task Descriptions (Faceted by Source and Phase)", - x = "PC3", - y = "PC8", + title = "PCs for Task Comments (Faceted by Source and Phase)", + x = "PC4", + y = "PC1", fill = "author_same_as_task_creator?" )