Some small updates

This commit is contained in:
Nora Wickelmaier 2024-03-13 18:14:57 +01:00
parent 7ee9195563
commit 752501b4df
2 changed files with 20 additions and 4 deletions

View File

@ -12,9 +12,9 @@
# input: results/haum/event_logfiles_2024-02-21_16-07-33.csv # input: results/haum/event_logfiles_2024-02-21_16-07-33.csv
# output: # output:
# #
# last mod: 2023-11-15, NW # last mod: 2024-03-13
# setwd("C:/Users/nwickelmaier/Nextcloud/Documents/MDS/2023ss/60100_master_thesis/code") # setwd("C:/Users/nwickelmaier/Nextcloud/Documents/MDS/2023ss/60100_master_thesis/analysis/code")
library(lattice) library(lattice)
library(bupaverse) library(bupaverse)
@ -40,7 +40,7 @@ datlogs$event <- factor(datlogs$event, levels = c("move", "flipCard",
"openTopic", "openTopic",
"openPopup")) "openPopup"))
datraw <- read.table("results/haum/raw_logfiles_2024-01-18_09-58-52.csv", datraw <- read.table("results/haum/raw_logfiles_2024-02-21_16-07-33.csv",
sep = ";", header = TRUE) sep = ";", header = TRUE)
# Add weekdays to data frame # Add weekdays to data frame
@ -51,6 +51,7 @@ datlogs$weekdays <- factor(weekdays(datlogs$date.start),
labels = c("Monday", "Tuesday", "Wednesday", labels = c("Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday", "Thursday", "Friday", "Saturday",
"Sunday")) "Sunday"))
### Number of log files ### Number of log files
length(unique(datraw$fileId)) length(unique(datraw$fileId))
# 39767 # 39767

View File

@ -36,6 +36,10 @@ coor_2d <- coor_3d[, 1:2]
plot(coor_2d) plot(coor_2d)
rgl::plot3d(coor_3d) rgl::plot3d(coor_3d)
# pm <- cluster::pam(dist_mat, k = k)
# cluster <- pm$clustering
# --> Does not look as good as the hierarchical clustring
method <- c(average = "average", single = "single", complete = "complete", method <- c(average = "average", single = "single", complete = "complete",
ward = "ward") ward = "ward")
hcs <- pbapply::pblapply(method, function(x) cluster::agnes(dist_mat, method = x)) hcs <- pbapply::pblapply(method, function(x) cluster::agnes(dist_mat, method = x))
@ -71,7 +75,18 @@ tmp <- dat
tmp$start <- tmp$date.start tmp$start <- tmp$date.start
tmp$complete <- tmp$date.stop tmp$complete <- tmp$date.stop
alog <- bupaR::activitylog(tmp[tmp$case == 24016, ], # Examples:
## Scholar: 29679
## Star: 24456
## Dispersion: 26000
## only info cards: 24299
## not only info cards: 24013
#head(dattree[dattree$Pattern == "Dispersion" & datcase$nitems == 10, ])
#head(dattree[dattree$InfocardOnly == "yes" & datcase$nitems == 3, ])
alog <- bupaR::activitylog(tmp[tmp$case == 24013, ],
case_id = "case", case_id = "case",
activity_id = "item", activity_id = "item",
resource_id = "path", resource_id = "path",