Skip to main content

oc_declare

process_mining::discovery::object_centric::oc_declare

Functions in this Module(3)

project_oc_arcs

Project OC-DECLARE arcs onto a subset of activities, preserving constraints
that reach a target via a chain through transitive activities.
BFSs from every target activity through non-target intermediaries, composing
arc types and labels along the way.
Source
fn project_oc_arcs(arcs*: Vec<OCDeclareArc>, activities*: Vec<String>, reduction*: OCDeclareReductionMode)Vec<OCDeclareArc>

Arguments

Returns

import r4pm

arcs = [{"arc_type": 'AS', "counts": [1, 1], "from": 'example', "label": {"all": [{"object_type": 'order', "type": 'Simple'}], "any": [{"object_type": 'order', "type": 'Simple'}], "each": [{"object_type": 'order', "type": 'Simple'}]}, "to": 'example'}]
res = r4pm.bindings.project_oc_arcs(arcs, ['example'], 'None')
Defined inprocess_mining/src/discovery/object_centric/oc_declare/mod.rs:774

reduce_oc_arcs

Reduce OC-DECLARE arcs based on lossless/lossy transitive reduction
considering paths of arbitrary length.
Uses sequential processing to prevent mutual elimination in cycles.
Source
fn reduce_oc_arcs(arcs*: Vec<OCDeclareArc>, lossless*: bool)Vec<OCDeclareArc>

Arguments

Returns

import r4pm

arcs = [{"arc_type": 'AS', "counts": [1, 1], "from": 'example', "label": {"all": [{"object_type": 'order', "type": 'Simple'}], "any": [{"object_type": 'order', "type": 'Simple'}], "each": [{"object_type": 'order', "type": 'Simple'}]}, "to": 'example'}]
res = r4pm.bindings.reduce_oc_arcs(arcs, False)
Defined inprocess_mining/src/discovery/object_centric/oc_declare/mod.rs:623

discover_oc_declare

Discover behavioral OC-DECLARE constraints from the given OCEL
Source
fn discover_oc_declare(locel*: SlimLinkedOCEL, options: OCDeclareDiscoveryOptions)Vec<OCDeclareArc>

Arguments

Returns

import r4pm
locel = r4pm.import_item('SlimLinkedOCEL','path/to/file')
# Optional argument: options, can also be omitted
options = {"considered_arrow_types": ['AS'], "counts_for_filter": [1, 1], "counts_for_generation": [1, 1], "noise_threshold": 0.2, "o2o_mode": 'None', "reduction": 'None', "refinement": False}
res = r4pm.bindings.discover_oc_declare(locel, options)