Skip to content

Commit

Permalink
Analyse confidences
Browse files Browse the repository at this point in the history
  • Loading branch information
richelbilderbeek committed Nov 29, 2024
1 parent beb3bd9 commit 5cc00fb
Show file tree
Hide file tree
Showing 16 changed files with 421 additions and 66 deletions.
147 changes: 81 additions & 66 deletions evaluations/2024_autumn/analyse_confidences.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,33 +57,35 @@ header_to_names <- function(header) {
"I feel confident that :: ",
"Confidence level: ",
"confidence level: ",
"What are my confidence level in my...: ",
"^ - ",
"^- " # Must be last
)
for (remove_str in remove_strs) {
header_strs <- stringr::str_remove(header_strs, remove_str)
header_strs <- stringr::str_trim(header_strs)
}
header_strs
}

testthat::expect_equal(c("A", "B"), header_to_names(header = "A,B"))

testthat::expect_equal(0, sum(stringr::str_count(header_to_names(get_example_header_monday()), "I feel")))

header_to_names(get_example_header_monday())
# header_to_names(get_example_header_monday())

testthat::expect_equal(0, sum(stringr::str_count(header_to_names(header = get_example_header_tuesday()), "How comfortable")))
testthat::expect_equal(0, sum(stringr::str_count(header_to_names(header = get_example_header_tuesday()), "confident")))
testthat::expect_equal(0, sum(stringr::str_count(header_to_names(header = get_example_header_tuesday()), "confident am I")))
# header_to_names(get_example_header_tuesday())

header_to_names(get_example_header_tuesday())

testthat::expect_equal(0, sum(stringr::str_count(header_to_names(get_example_header_wednesday()), "confident")))
testthat::expect_equal(0, sum(stringr::str_count(header_to_names(get_example_header_wednesday()), "confident")))
header_to_names(get_example_header_wednesday())
# header_to_names(get_example_header_wednesday())

testthat::expect_equal(0, sum(stringr::str_count(header_to_names(get_example_header_thursday()), "What are my confidence level")))
# header_to_names(get_example_header_thursday())

testthat::expect_equal(18, length(header_to_names(get_example_header_friday())))
# header_to_names(get_example_header_friday())

# Convert a confidences file to a table
# Convert a confidences file to a table, with all columns
file_to_table <- function(filename) {
testthat::expect_true(file.exists(filename))
lines_with_header <- readr::read_lines(filename)
Expand All @@ -96,68 +98,81 @@ file_to_table <- function(filename) {
table_names <- header_to_names(header)
testthat::expect_equal(ncol(t), length(table_names))
names(t) <- table_names

t
}


t <- readr::read_csv("20240925_fixed.csv")
t$Timestamp <- NULL
t$`Any feedback?` <- NULL
# tail(names(t))
questions <- stringr::str_remove(
stringr::str_remove(
names(t),
"Give you confidence levels of the following statements: \\["),
"\\]"
)
#new_names <- c(
# paste0("q0", seq(1, 9)),
# paste0("q", seq(10, 16))
#)
new_names <- questions
names(t) <- new_names

t$i <- seq(1, nrow(t))

names(t)
t_tidy <- tidyr::pivot_longer(t, cols = starts_with("I", ignore.case = FALSE))
names(t_tidy)
# No idea why 'starts_with("I", ignore.case = FALSE)' does not work today
t_tidy$`Any other feedback?` <- NULL
names(t_tidy) <- c("i", "question", "answer")
t_tidy

n_individuals <- length(unique(t_tidy$i))
n_ratings <- length(t_tidy$answer[!is.na(t_tidy$answer)])

mean_confidence <- mean(t_tidy$answer[!is.na(t_tidy$answer)])

ggplot2::ggplot(t_tidy, ggplot2::aes(x = answer)) +
ggplot2::geom_histogram() +
ggplot2::labs(
title = "All confidences",
caption = paste0(
"#individuals: ", n_individuals, ". ",
"#ratings: ", n_ratings, ". ",
"Mean confidence: ", round(mean_confidence, digits = 2)
)
for (day in get_all_days()) {
testthat::expect_no_error(
file_to_table(filename = day_to_filename(day))
)
}

ggplot2::ggsave(filename = "all_confidences.png", width = 4, height = 2)

ggplot2::ggplot(t_tidy, ggplot2::aes(x = answer)) +
ggplot2::geom_histogram() +
ggplot2::facet_grid(rows = "question", scales = "free_y") +
ggplot2::theme(
strip.text.y = ggplot2::element_text(angle = 0),
legend.position = "none"
) +
ggplot2::labs(
title = "Confidences per question"
)
file_to_confidences <- function(filename) {
t <- file_to_table(filename)
testthat::expect_true(stringr::str_detect(names(t)[4], "[cC]onf"))
t[, 4] <- NULL
testthat::expect_true(stringr::str_detect(names(t)[3], "[vV]oter"))
t[, 3] <- NULL
testthat::expect_true(stringr::str_detect(names(t)[2], "[sS]ession"))
t[, 2] <- NULL
testthat::expect_true(stringr::str_detect(names(t)[1], "[dD]ate"))
t[, 1] <- NULL
t
}

ggplot2::ggsave(filename = "confidences_per_question.png", width = 6, height = 7)

testthat::expect_no_error(file_to_confidences(filename = day_to_filename("wednesday")))

names(t_tidy)
for (day in get_all_days()) {
filename <- day_to_filename(day)
testthat::expect_no_error(file_to_confidences(filename))
}


for (day in get_all_days()) {
filename <- day_to_filename(day)
testthat::expect_true(file.exists(filename))
t <- file_to_confidences(filename)
t$i <- seq(1, nrow(t))
t_tidy <- tidyr::pivot_longer(t, cols = !tidyr::last_col())
names(t_tidy) <- c("i", "question", "answer")
t_tidy$answer <- as.numeric(t_tidy$answer)

n_individuals <- length(unique(t_tidy$i))
n_ratings <- length(t_tidy$answer[!is.na(t_tidy$answer)])
mean_confidence <- mean(t_tidy$answer[!is.na(t_tidy$answer)])

all_confidences_filename <- paste0(day, "_all_confidences.png")

ggplot2::ggplot(t_tidy, ggplot2::aes(x = answer)) +
ggplot2::geom_histogram(binwidth = 1) +
ggplot2::labs(
title = "All confidences",
caption = paste0(
"#individuals: ", n_individuals, ". ",
"#ratings: ", n_ratings, ". ",
"Mean confidence: ", round(mean_confidence, digits = 2)
)
)
ggplot2::ggsave(filename = all_confidences_filename, width = 4, height = 2)


ggplot2::ggplot(t_tidy, ggplot2::aes(x = answer)) +
ggplot2::geom_histogram(binwidth = 1) +
ggplot2::facet_grid(rows = "question", scales = "free_y") +
ggplot2::theme(
strip.text.y = ggplot2::element_text(angle = 0),
legend.position = "none"
) +
ggplot2::labs(
title = "Confidences per question"
)

confidences_per_question_filename <- paste0(day, "_confidences_per_question.png")
ggplot2::ggsave(filename = confidences_per_question_filename, width = 6, height = 7)

readr::write_csv(x = dplyr::tally(dplyr::group_by(t_tidy, question, answer)), file = "tally.csv")
tally <- dplyr::tally(dplyr::group_by(t_tidy, question, answer))
tally_filename <- paste0(day, "_tally.csv")
readr::write_csv(x = tally, file = tally_filename)
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions evaluations/2024_autumn/friday_tally.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
question,answer,n
I can create a Big O profile of my project,1,1
I can create a Big O profile of my project,6,1
I can create a Big O profile of my project,8,1
I can create a Big O profile of my project,9,1
I can create a Big O profile of my project,10,2
I can create a runtime speed profile,4,1
I can create a runtime speed profile,9,1
I can create a runtime speed profile,10,4
I can evaluate different available tools for reproducibility and installations,3,1
I can evaluate different available tools for reproducibility and installations,5,1
I can evaluate different available tools for reproducibility and installations,6,1
I can evaluate different available tools for reproducibility and installations,7,1
I can evaluate different available tools for reproducibility and installations,8,1
I can evaluate different available tools for reproducibility and installations,10,1
I can make an installation instruction for potential users,5,1
I can make an installation instruction for potential users,7,1
I can make an installation instruction for potential users,9,1
I can make an installation instruction for potential users,10,3
I can make citation info,8,1
I can make citation info,9,3
I can make citation info,10,2
I can mentalize the installation needs from the users' perspective,2,1
I can mentalize the installation needs from the users' perspective,5,1
I can mentalize the installation needs from the users' perspective,6,1
I can mentalize the installation needs from the users' perspective,7,1
I can mentalize the installation needs from the users' perspective,8,1
I can mentalize the installation needs from the users' perspective,9,1
I can read a runtime speed profile,7,1
I can read a runtime speed profile,9,1
I can read a runtime speed profile,10,4
I know how to find instruction of going to more sophisticated documentation,6,1
I know how to find instruction of going to more sophisticated documentation,7,1
I know how to find instruction of going to more sophisticated documentation,8,2
I know how to find instruction of going to more sophisticated documentation,9,1
I know how to find instruction of going to more sophisticated documentation,10,1
I know the most important sections for a full public README,9,2
I know the most important sections for a full public README,10,4
I learned a lot of new things about software development as a process,10,6
I understand how to methodically optimize the runtime speed of my code,4,1
I understand how to methodically optimize the runtime speed of my code,7,1
I understand how to methodically optimize the runtime speed of my code,8,2
I understand how to methodically optimize the runtime speed of my code,10,2
I understand what Big O is,8,1
I understand what Big O is,9,3
I understand what Big O is,10,2
I will use what I learned in my projects,9,1
I will use what I learned in my projects,10,5
The course met my expectations,8,1
The course met my expectations,9,2
The course met my expectations,10,3
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 96 additions & 0 deletions evaluations/2024_autumn/monday_tally.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
question,answer,n
I can connect to the course repo,8,1
I can connect to the course repo,9,2
I can connect to the course repo,10,6
I can connect to the course repo,NA,1
I can do a simple FMEA,1,1
I can do a simple FMEA,4,2
I can do a simple FMEA,6,1
I can do a simple FMEA,7,2
I can do a simple FMEA,8,2
I can do a simple FMEA,9,1
I can do a simple FMEA,NA,1
I can find the needs/buissnes requirments,5,4
I can find the needs/buissnes requirments,6,2
I can find the needs/buissnes requirments,9,3
I can find the needs/buissnes requirments,NA,1
I can make an issue in the project,1,1
I can make an issue in the project,5,3
I can make an issue in the project,6,1
I can make an issue in the project,7,1
I can make an issue in the project,8,3
I can make an issue in the project,NA,1
I know basic Git,5,1
I know basic Git,8,3
I know basic Git,9,3
I know basic Git,10,2
I know basic Git,NA,1
I know ehat a Requirment is,5,1
I know ehat a Requirment is,6,1
I know ehat a Requirment is,7,1
I know ehat a Requirment is,8,2
I know ehat a Requirment is,9,4
I know ehat a Requirment is,NA,1
I know how to write a formal requiremnts documentation,4,1
I know how to write a formal requiremnts documentation,5,1
I know how to write a formal requiremnts documentation,6,1
I know how to write a formal requiremnts documentation,7,3
I know how to write a formal requiremnts documentation,8,2
I know how to write a formal requiremnts documentation,9,1
I know how to write a formal requiremnts documentation,NA,1
I know the difference between a requirment and an Feature,3,3
I know the difference between a requirment and an Feature,5,3
I know the difference between a requirment and an Feature,7,2
I know the difference between a requirment and an Feature,8,1
I know the difference between a requirment and an Feature,NA,1
I know what a derived requirement,1,1
I know what a derived requirement,4,1
I know what a derived requirement,5,3
I know what a derived requirement,7,1
I know what a derived requirement,8,1
I know what a derived requirement,9,2
I know what a derived requirement,NA,1
I kow how a remote repo works,5,1
I kow how a remote repo works,7,1
I kow how a remote repo works,8,3
I kow how a remote repo works,9,3
I kow how a remote repo works,10,1
I kow how a remote repo works,NA,1
I kow why we specify requirments,5,2
I kow why we specify requirments,7,2
I kow why we specify requirments,8,2
I kow why we specify requirments,9,3
I kow why we specify requirments,NA,1
The purpouse of formalism in Computer Science,3,1
The purpouse of formalism in Computer Science,6,2
The purpouse of formalism in Computer Science,7,2
The purpouse of formalism in Computer Science,8,3
The purpouse of formalism in Computer Science,9,1
The purpouse of formalism in Computer Science,NA,1
What are the outcomes of a Program,3,1
What are the outcomes of a Program,5,1
What are the outcomes of a Program,7,1
What are the outcomes of a Program,8,1
What are the outcomes of a Program,9,4
What are the outcomes of a Program,10,1
What are the outcomes of a Program,NA,1
What are the steps of development,5,1
What are the steps of development,6,2
What are the steps of development,7,3
What are the steps of development,8,2
What are the steps of development,9,1
What are the steps of development,NA,1
What is UML,3,1
What is UML,5,1
What is UML,7,2
What is UML,8,3
What is UML,9,1
What is UML,10,1
What is UML,NA,1
What is the Software development life cycle,3,1
What is the Software development life cycle,4,1
What is the Software development life cycle,5,2
What is the Software development life cycle,6,1
What is the Software development life cycle,7,2
What is the Software development life cycle,8,2
What is the Software development life cycle,NA,1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 61 additions & 0 deletions evaluations/2024_autumn/thursday_tally.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
question,answer,n
"Comprehend the principles of object-oriented development, such as information hiding, encapsulation, and message passing.",6,2
"Comprehend the principles of object-oriented development, such as information hiding, encapsulation, and message passing.",8,1
"Comprehend the principles of object-oriented development, such as information hiding, encapsulation, and message passing.",9,1
"Comprehend the principles of object-oriented development, such as information hiding, encapsulation, and message passing.",10,1
Gain an introductory understanding of modular programming,7,2
Gain an introductory understanding of modular programming,8,3
I can criticise functions,7,1
I can criticise functions,8,2
I can criticise functions,9,1
I can criticise functions,10,1
I can give a function a proper name,8,1
I can give a function a proper name,9,3
I can give a function a proper name,10,1
I can give some features of good function design,7,1
I can give some features of good function design,9,1
I can give some features of good function design,10,3
I can write a class to express what the data it contains,7,2
I can write a class to express what the data it contains,8,3
I inderstand difference between composition and aggregation,4,1
I inderstand difference between composition and aggregation,6,2
I inderstand difference between composition and aggregation,7,1
I inderstand difference between composition and aggregation,9,1
I understand the type of relation 'composition' is,5,1
I understand the type of relation 'composition' is,7,1
I understand the type of relation 'composition' is,8,1
I understand the type of relation 'composition' is,9,2
I understand the type of relation 'inheritance' is,6,1
I understand the type of relation 'inheritance' is,7,2
I understand the type of relation 'inheritance' is,8,1
I understand the type of relation 'inheritance' is,9,1
I understand why function design is important,7,1
I understand why function design is important,9,1
I understand why function design is important,10,3
Iterative refactoring.,1,2
Iterative refactoring.,2,1
Iterative refactoring.,4,1
Iterative refactoring.,7,1
"Learn about common interfaces, protocols, and their role in modular programming.",3,1
"Learn about common interfaces, protocols, and their role in modular programming.",5,3
"Learn about common interfaces, protocols, and their role in modular programming.",6,1
"Learn the definition and characteristics of an object, including its ability to save state and perform operations.",6,1
"Learn the definition and characteristics of an object, including its ability to save state and perform operations.",7,1
"Learn the definition and characteristics of an object, including its ability to save state and perform operations.",8,1
"Learn the definition and characteristics of an object, including its ability to save state and perform operations.",9,2
Recognize and address tight coupling in code to improve modularity.,1,2
Recognize and address tight coupling in code to improve modularity.,2,1
Recognize and address tight coupling in code to improve modularity.,3,1
Recognize and address tight coupling in code to improve modularity.,7,1
"Recognize the importance of relationships between classes, including association, composition, and aggregation, in class diagrams.",4,1
"Recognize the importance of relationships between classes, including association, composition, and aggregation, in class diagrams.",6,1
"Recognize the importance of relationships between classes, including association, composition, and aggregation, in class diagrams.",8,2
"Recognize the importance of relationships between classes, including association, composition, and aggregation, in class diagrams.",10,1
Understand the benefits of object-oriented development,8,3
Understand the benefits of object-oriented development,9,2
Understand the concept of code smells and design smells.,4,2
Understand the concept of code smells and design smells.,5,1
Understand the concept of code smells and design smells.,8,1
Understand the concept of code smells and design smells.,9,1
Understand the definition and structure of a class as a collection of objects with common traits and behaviors.,8,2
Understand the definition and structure of a class as a collection of objects with common traits and behaviors.,9,3
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5cc00fb

Please sign in to comment.