blocking_factor {CurricularAnalytics} | R Documentation |
Calculate blocking factor
Description
A helper function for calculating the blocking factor for each node and the total blocking factor of a curriculum graph.
Usage
blocking_factor(node_list, edge_list)
Arguments
node_list |
Dataframe with an 'id' column for each node and a 'term' column specifying which term the course is to be taken in. |
edge_list |
Dataframe with two columns 'from' and 'to' specifying
directed edges starting at 'from' nodes directed towards 'to' nodes. Entries
must use node ids from |
Details
Blocking quantifies when a failing a course would result in being blocked from registering for future courses. More formally the blocking factor of a node v_i
is defined as
b_c(v_i) = \sum_{v_j \in V} I(v_i,v_j)
where I
is the indicator
function:
=\begin{cases}1, & \text{if } v_i \to v_j \\ 0, &
\text{if }v_i \not\to v_j\end{cases}
The blocking factor for an entire curriculum graph G_c
is defined as
b(G_c)=\sum_{v_i \in V} b_c(v_i)
Value
A list that contains the following:
bynode |
A dataframe containing the blocking factor of each node |
total |
The total blocking factor of the curriculum graph |
Author(s)
Daniel Krasnov
References
Heileman, Gregory L, Chaouki T Abdallah, Ahmad Slim, and Michael Hickman. 2018. “Curricular Analytics: A Framework for Quantifying the Impact of Curricular Reforms and Pedagogical Innovations.” arXiv Preprint arXiv:1811.09676.
Examples
edge_list <- data.frame(from = c(1, 3), to = c(3, 4))
node_list <-
data.frame(
id = 1:4,
label = c("MATH 100", "DATA 101", "MATH 101", "MATH 221"),
term = c(1, 1, 2, 2)
)
bf_list <- blocking_factor(node_list,edge_list)
print(bf_list)
# Output:
# $bynode
# id bf
# 2 1 2
# 3 2 0
# 4 3 1
# 5 4 0
# $total
# [1] 3