Compare commits
2 Commits
fa3d400ede
...
f39614b6cf
Author | SHA1 | Date | |
---|---|---|---|
f39614b6cf | |||
0b067d8419 |
@ -47,7 +47,7 @@ datitem$scaleSize <- aggregate(scaleSize ~ item, dat, mean)$scaleSize
|
||||
datitem$rotationDegree <- aggregate(rotationDegree ~ item, dat, mean)$rotationDegree
|
||||
datitem$npaths <- aggregate(path ~ item, dat, function(x) length(unique(x)))$path
|
||||
datitem$ncases <- aggregate(case ~ item, dat, function(x) length(unique(x)))$case
|
||||
datitem$nmoves <- aggregate(event ~ item, dat, table)$event[,"move"]
|
||||
datitem$nmove <- aggregate(event ~ item, dat, table)$event[,"move"]
|
||||
datitem$nflipCard <- aggregate(event ~ item, dat, table)$event[,"flipCard"]
|
||||
datitem$nopenTopic <- aggregate(event ~ item, dat, table)$event[,"openTopic"]
|
||||
datitem$nopenPopup <- aggregate(event ~ item, dat, table)$event[,"openPopup"]
|
||||
@ -58,7 +58,7 @@ rm(datpath)
|
||||
|
||||
df <- datitem[, c("precision", "generalizability", "nvariants", "duration",
|
||||
"distance", "scaleSize", "rotationDegree", "npaths",
|
||||
"ncases", "nmoves", "nflipCard", "nopenTopic",
|
||||
"ncases", "nmove", "nflipCard", "nopenTopic",
|
||||
"nopenPopup")] |>
|
||||
scale()
|
||||
|
||||
@ -112,12 +112,12 @@ factoextra::fviz_cluster(list(data = df, cluster = cluster),
|
||||
ggtheme = ggplot2::theme_bw())
|
||||
|
||||
aggregate(cbind(precision, generalizability, nvariants, duration, distance,
|
||||
scaleSize , rotationDegree, npaths, ncases, nmoves,
|
||||
scaleSize , rotationDegree, npaths, ncases, nmove,
|
||||
nflipCard, nopenTopic, nopenPopup) ~ cluster, datitem,
|
||||
mean)
|
||||
|
||||
aggregate(cbind(duration, distance, scaleSize , rotationDegree, npaths,
|
||||
ncases, nmoves, nflipCard, nopenTopic, nopenPopup) ~ cluster,
|
||||
ncases, nmove, nflipCard, nopenTopic, nopenPopup) ~ cluster,
|
||||
datitem, max)
|
||||
|
||||
item <- sprintf("%03d", as.numeric(gsub("item_([0-9]{3})", "\\1",
|
||||
|
@ -9,7 +9,7 @@
|
||||
# output: results/dataframes_case_2019.RData
|
||||
# results/centrality_cases.RData
|
||||
#
|
||||
# last mod: 2024-04-17
|
||||
# last mod: 2024-04-25
|
||||
|
||||
# setwd("C:/Users/nwickelmaier/Nextcloud/Documents/MDS/2023ss/60100_master_thesis/analysis/")
|
||||
|
||||
@ -91,21 +91,6 @@ datcase$max_time <- NULL
|
||||
artworks <- unique(dat$item)[!unique(dat$item) %in% c("501", "502", "503")]
|
||||
datcase$infocardOnly <- pbapply::pbsapply(dat_split, check_infocards, artworks = artworks)
|
||||
|
||||
# Clean up NAs
|
||||
datcase$distance <- ifelse(is.na(datcase$distance), 0, datcase$distance)
|
||||
datcase$scaleSize <- ifelse(is.na(datcase$scaleSize), 1, datcase$scaleSize)
|
||||
datcase$rotationDegree <- ifelse(is.na(datcase$rotationDegree), 0, datcase$rotationDegree)
|
||||
datcase$artist <- ifelse(is.na(datcase$artist), 0, datcase$artist)
|
||||
datcase$details <- ifelse(is.na(datcase$details), 0, datcase$details)
|
||||
datcase$extra_info <- ifelse(is.na(datcase$extra_info), 0, datcase$extra_info)
|
||||
datcase$komposition <- ifelse(is.na(datcase$komposition), 0, datcase$komposition)
|
||||
datcase$leben_des_kunstwerks <- ifelse(is.na(datcase$leben_des_kunstwerks), 0, datcase$leben_des_kunstwerks)
|
||||
datcase$licht_und_farbe <- ifelse(is.na(datcase$licht_und_farbe), 0, datcase$licht_und_farbe)
|
||||
datcase$technik <- ifelse(is.na(datcase$technik), 0, datcase$technik)
|
||||
datcase$thema <- ifelse(is.na(datcase$thema), 0, datcase$thema)
|
||||
datcase$ntopics <- ifelse(is.na(datcase$ntopics), 0, datcase$ntopics)
|
||||
datcase$ntopiccards <- ifelse(is.na(datcase$ntopiccards), 0, datcase$ntopiccards)
|
||||
|
||||
#--------------- (3) Select features for navigation behavior ---------------
|
||||
|
||||
# Features for navigation types for MTT:
|
||||
@ -159,7 +144,7 @@ rm(tmp)
|
||||
dattree$InfocardOnly <- factor(datcase$infocardOnly, levels = 0:1,
|
||||
labels = c("no", "yes"))
|
||||
|
||||
# Add pattern to datcase; loosely based on Bousbia et al. (2009)
|
||||
# Add pattern to dattree; loosely based on Bousbia et al. (2009)
|
||||
dattree$Pattern <- "Dispersion"
|
||||
dattree$Pattern <- ifelse(dattree$PathLinearity > 0.8, "Scholar",
|
||||
dattree$Pattern)
|
||||
|
@ -10,7 +10,7 @@
|
||||
# output: ../thesis/results/clustering_cases_2018.RData
|
||||
# ../thesis/results/clustering_cases.RData
|
||||
#
|
||||
# last mod: 2024-04-17
|
||||
# last mod: 2024-04-25
|
||||
|
||||
# setwd("C:/Users/nwickelmaier/Nextcloud/Documents/MDS/2023ss/60100_master_thesis/analysis/")
|
||||
|
||||
@ -61,11 +61,6 @@ datcase18$max_time <- NULL
|
||||
artworks <- unique(dat$item)[!unique(dat$item) %in% c("501", "502", "503")]
|
||||
datcase18$infocardOnly <- pbapply::pbsapply(dat_split, check_infocards, artworks = artworks)
|
||||
|
||||
# Clean up NAs
|
||||
datcase18$distance <- ifelse(is.na(datcase18$distance), 0, datcase18$distance)
|
||||
datcase18$scaleSize <- ifelse(is.na(datcase18$scaleSize), 1, datcase18$scaleSize)
|
||||
datcase18$rotationDegree <- ifelse(is.na(datcase18$rotationDegree), 0, datcase18$rotationDegree)
|
||||
|
||||
#--------------- (3) Select features for navigation behavior ---------------
|
||||
|
||||
dattree18 <- data.frame(case = datcase18$case,
|
||||
|
Loading…
Reference in New Issue
Block a user