Directly follows graph
ObjectEdge ¶
Bases: Annotated
A directed edge between two activities in an object-centric directly-follows graph.
Attributes:
| Name | Type | Description |
|---|---|---|
source | str | None | Source activity name. If |
target | str | None | Target activity name. If |
count | int | Frequency of this directly-follows relation. |
Source code in src/ocelescope/src/ocelescope/resource/default/dfg.py
DirectlyFollowsGraph ¶
Bases: Resource
Object-centric Directly Follows Graph (DFG).
This resource represents directly-follows relations between activities, grouped by object type. For each object type, the graph contains a list of ObjectEdge instances describing observed transitions.
Attributes:
| Name | Type | Description |
|---|---|---|
edges | dict[str, list[ObjectEdge]] | Mapping from object type name to a list of directed edges observed for that object type. |
activity_annotations | dict[str, Resource] | Optional per-activity annotations used by the visualization layer. Keys should match activity names. |
object_type_annotations | dict[str, Resource] | Optional per-object-type annotations used by the visualization layer. Keys should match object type names. |
Source code in src/ocelescope/src/ocelescope/resource/default/dfg.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | |
counts property ¶
Return edge counts per object type.
Returns:
| Type | Description |
|---|---|
dict[str, dict[tuple[str | None, str | None], int]] | A nested mapping |
Notes
source and/or target may be None to represent transitions from the start node or to the end node for a given object type.
activity_names property ¶
List all distinct activity names appearing as a source or target.
Returns:
| Type | Description |
|---|---|
list[str] | A list of unique activity names across all object types. |
object_type_names property ¶
List the object types present in this graph.
Returns:
| Type | Description |
|---|---|
list[str] | A list of object type names (the keys of |
visualize ¶
Build a visualization-friendly graph representation.
Creates
- Activity nodes (rectangles), optionally annotated via
self.activity_annotations. - Start/end nodes (circles) per object type, optionally annotated via
self.object_type_annotations. - Colored directed edges per object type with annotation-derived labels.
Source code in src/ocelescope/src/ocelescope/resource/default/dfg.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | |