Chapter 5 可视化
5.1 频率图
可以使用 process _ map ()创建日志的进程映射。流程图是一个直接跟随的图形,其中每个不同的活动由一个节点表示,每个活动之间的直接跟随关系由有向边显示,即节点之间的箭头。
有6种频率图
- absolute frequency
- absolute-case frequency
- relative frequency
- relative-case frequency
- relative-antecedent frequency
- relative-consequent frequency
5.1.1 Absolute
## Loading required package: tidyverse
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.4.0 ✔ purrr 1.0.2
## ✔ tibble 3.2.1 ✔ dplyr 1.1.3
## ✔ tidyr 1.3.0 ✔ stringr 1.5.0
## ✔ readr 2.1.3 ✔ forcats 0.5.2
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## Loading required package: bupaverse
##
## .______ __ __ .______ ___ ____ ____ _______ .______ _______. _______
## | _ \ | | | | | _ \ / \ \ \ / / | ____|| _ \ / || ____|
## | |_) | | | | | | |_) | / ^ \ \ \/ / | |__ | |_) | | (----`| |__
## | _ < | | | | | ___/ / /_\ \ \ / | __| | / \ \ | __|
## | |_) | | `--' | | | / _____ \ \ / | |____ | |\ \----.----) | | |____
## |______/ \______/ | _| /__/ \__\ \__/ |_______|| _| `._____|_______/ |_______|
## ── Attaching packages ─────────────────────────────────────── bupaverse 0.1.0 ──✔ bupaR 0.5.3 ✔ processcheckR 0.1.4
## ✔ edeaR 0.9.1 ✔ processmapR 0.5.2
## ✔ eventdataR 0.3.1 ── Conflicts ────────────────────────────────────────── bupaverse_conflicts() ──
## ✖ processcheckR::contains() masks dplyr::contains(), tidyr::contains()
## ✖ bupaR::filter() masks dplyr::filter(), stats::filter()
## ✖ processmapR::frequency() masks stats::frequency()
## ✖ edeaR::setdiff() masks dplyr::setdiff(), base::setdiff()
## ✖ bupaR::timestamp() masks utils::timestamp()
## ✖ processcheckR::xor() masks base::xor()
直接显示node 和arc出现次数.
5.2 性能图
流程映射也可以用来显示流程的性能
5.2.1 Aggregation function
默认情况下, 会显示平均值, 还可以显示其他统计量
## Warning: There was 1 warning in `summarize()`.
## ℹ In argument: `label = do.call(...)`.
## ℹ In group 10: `ACTIVITY_CLASSIFIER_ = NA`, `from_id = NA`.
## Caused by warning in `type()`:
## ! no non-missing arguments to max; returning -Inf
## Warning: There were 2 warnings in `summarize()`.
## The first warning was:
## ℹ In argument: `value = do.call(...)`.
## ℹ In group 1: `ACTIVITY_CLASSIFIER_ = "ARTIFICIAL_END"`, `next_act = NA`,
## `from_id = 1`, `to_id = NA`.
## Caused by warning in `type()`:
## ! no non-missing arguments to max; returning -Inf
## ℹ Run `dplyr::last_dplyr_warnings()` to see the 1 remaining warning.
5.5 Process Matrix
过程矩阵是一个二维矩阵,显示活动之间的流动。
5.5.1 频率过程矩阵
## # A tibble: 47 × 3
## antecedent consequent n
## <fct> <fct> <dbl>
## 1 Add penalty Insert Date Appeal to Prefecture 41
## 2 Add penalty Notify Result Appeal to Offender 3
## 3 Add penalty Payment 1117
## 4 Add penalty Receive Result Appeal from Prefecture 15
## 5 Add penalty Send Appeal to Prefecture 171
## 6 Add penalty Send for Credit Collection 3288
## 7 Appeal to Judge Add penalty 13
## 8 Appeal to Judge End 5
## 9 Appeal to Judge Insert Date Appeal to Prefecture 1
## 10 Create Fine Payment 3443
## # ℹ 37 more rows
5.5.2 性能过程矩阵
显示两个activity 之间的性能
## # A tibble: 47 × 4
## antecedent consequent n flow_time
## <fct> <fct> <dbl> <dbl>
## 1 Add penalty Insert Date Appeal to Prefecture 41 9.43
## 2 Add penalty Notify Result Appeal to Offender 3 11.1
## 3 Add penalty Payment 1117 25.1
## 4 Add penalty Receive Result Appeal from Prefecture 15 6.96
## 5 Add penalty Send Appeal to Prefecture 171 36.4
## 6 Add penalty Send for Credit Collection 3288 69.7
## 7 Appeal to Judge Add penalty 13 4.51
## 8 Appeal to Judge End 5 0
## 9 Appeal to Judge Insert Date Appeal to Prefecture 1 0.286
## 10 Create Fine Payment 3443 1.33
## # ℹ 37 more rows