Creates a dependency matrix from a precedence matrix (precedence_matrix
) based on different approaches.
dependency_matrix(
eventlog = NULL,
dependency_type = dependency_type_fhm(threshold_dependency = threshold,
threshold_frequency = threshold_frequency, ...),
threshold = 0.9,
threshold_frequency = 0,
...
)
A bupaR event log, may be NULL when a precedence matrix is provided.
Which approach to use for calculation of the dependency matrix. Currently only (dependency_type_fhm
) is available.
A dependency threshold, usually in the interval [0,1]
, filtering out dependencies below the threshold.
An absolute frequency threshold filtering dependencies which are observed infrequently.
Parameters forwarded to (dependency_type_fhm
).
A square matrix with class dependency_matrix
containing the computed dependency values between all activities.
d <- dependency_matrix(L_heur_1)
print(d)
#> consequent
#> antecedent End Start a b c d e
#> End 0.0000000 0 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
#> Start 0.0000000 0 0.9756098 0.0000000 0.0000000 0.0000000 0.0000000
#> a 0.0000000 0 0.0000000 0.9166667 0.9166667 0.9285714 0.0000000
#> b 0.0000000 0 0.0000000 0.0000000 0.0000000 0.0000000 0.9166667
#> c 0.0000000 0 0.0000000 0.0000000 0.0000000 0.0000000 0.9166667
#> d 0.0000000 0 0.0000000 0.0000000 0.0000000 0.0000000 0.9285714
#> e 0.9756098 0 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
#> attr(,"class")
#> [1] "dependency_matrix" "matrix" "array"
as.matrix(d)
#> consequent
#> antecedent End Start a b c d e
#> End 0.0000000 0 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
#> Start 0.0000000 0 0.9756098 0.0000000 0.0000000 0.0000000 0.0000000
#> a 0.0000000 0 0.0000000 0.9166667 0.9166667 0.9285714 0.0000000
#> b 0.0000000 0 0.0000000 0.0000000 0.0000000 0.0000000 0.9166667
#> c 0.0000000 0 0.0000000 0.0000000 0.0000000 0.0000000 0.9166667
#> d 0.0000000 0 0.0000000 0.0000000 0.0000000 0.0000000 0.9285714
#> e 0.9756098 0 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000
#> attr(,"class")
#> [1] "dependency_matrix" "matrix" "array"