Skip to main content

activity_projection

process_mining::core::event_data::case_centric::utils::activity_projection

Functions in this Module(6)

log_to_activity_projection

Convert an EventLog into an EventLogActivityProjection
All traces with the same activity sequence are aggregated into one trace with a frequency count.
This effectively constructs all trace variants, with their count.
Source
fn log_to_activity_projection(log*: EventLog)EventLogActivityProjection

Arguments

Returns

import r4pm
log = r4pm.import_item('EventLog','path/to/file')

res = r4pm.bindings.log_to_activity_projection(log)
Defined inprocess_mining/src/core/event_data/case_centric/utils/activity_projection.rs:95

get_num_cases

Get the total number of cases in the projection
Source
fn get_num_cases(projection*: EventLogActivityProjection)u64

Arguments

Returns

import r4pm
projection = r4pm.import_item('EventLogActivityProjection','path/to/file')

res = r4pm.bindings.get_num_cases(projection)
Defined inprocess_mining/src/core/event_data/case_centric/utils/activity_projection.rs:199

get_top_n_variants

Get the n most frequent process variants, sorted by frequency (descending)
Each variant includes the activity sequence as names, its count, and percentage of total cases.
To get all variants, pass n = get_num_variants or use the get_variants function.
To get only the most frequent variant, pass n = 1.
Assumes projection.traces is sorted by descending frequency, as maintained by the provided
constructors.
Source
fn get_top_n_variants(projection*: EventLogActivityProjection, n*: i64<uint>)Vec<ProcessVariant>

Arguments

Returns

import r4pm
projection = r4pm.import_item('EventLogActivityProjection','path/to/file')

res = r4pm.bindings.get_top_n_variants(projection, 1)
Defined inprocess_mining/src/core/event_data/case_centric/utils/activity_projection.rs:246

get_num_variants

Get the number of distinct trace variants in the projection
Source
fn get_num_variants(projection*: EventLogActivityProjection)i64<uint>

Arguments

Returns

import r4pm
projection = r4pm.import_item('EventLogActivityProjection','path/to/file')

res = r4pm.bindings.get_num_variants(projection)
Defined inprocess_mining/src/core/event_data/case_centric/utils/activity_projection.rs:193

get_projection_activities

Get the list of all activity names in the projection
Source
fn get_projection_activities(projection*: EventLogActivityProjection)Vec<String>

Arguments

Returns

import r4pm
projection = r4pm.import_item('EventLogActivityProjection','path/to/file')

res = r4pm.bindings.get_projection_activities(projection)
Defined inprocess_mining/src/core/event_data/case_centric/utils/activity_projection.rs:205

get_variants

Get all process variants, sorted by frequency (descending)
Each variant includes the activity sequence as names, its count, and percentage of total cases.
Assumes projection.traces is sorted by descending frequency, as maintained by the provided
constructors.
Source
fn get_variants(projection*: EventLogActivityProjection)Vec<ProcessVariant>

Arguments

Returns

import r4pm
projection = r4pm.import_item('EventLogActivityProjection','path/to/file')

res = r4pm.bindings.get_variants(projection)