ocpa.algo.util.filtering.log package

Submodules

ocpa.algo.util.filtering.log.activity_filtering module

ocpa.algo.util.filtering.log.activity_filtering.filter_infrequent_activities(ocel, threshold)

Filters infrequent activities from an OCEL

Parameters
  • ocel (OCEL) – Object-centric event log

  • threshold (float) – Kumulative frequency of the most frequent activities to be included.

Returns

Object-centric event log

Return type

OCEL

ocpa.algo.util.filtering.log.case_filtering module

ocpa.algo.util.filtering.log.case_filtering.filter_process_executions(ocel, cases)

Filters process executions from an ocel

Parameters
  • ocel (OCEL) – Object-centric event log

  • cases – list of cases to be included (index of the case property of the OCEL)

Returns

Object-centric event log

Return type

OCEL

ocpa.algo.util.filtering.log.time_filtering module

ocpa.algo.util.filtering.log.time_filtering.contained(start, end, exec_start, exec_end)

Indicates whether a process execution belongs to a window given window start and end, and process execution start and end. A process execution belongs to a window if the process execution is completely contained in the window.

Parameters
  • start (timestamp) – Start of the window

  • end (timestamp) – End of the window

  • exec_start (timestamp) – Start of the process execution

  • exec_end (timestamp) – End of the process execution

Returns

Whether the process execution belongs to the window

Return type

boolean

ocpa.algo.util.filtering.log.time_filtering.end(start, end, exex_start, exec_end)

Indicates whether a process execution belongs to a window given window start and end, and process execution start and end. A process execution belongs to a window if the end is located in the window.

Parameters
  • start (timestamp) – Start of the window

  • end (timestamp) – End of the window

  • exec_start (timestamp) – Start of the process execution

  • exec_end (timestamp) – End of the process execution

Returns

Whether the process execution belongs to the window

Return type

boolean

ocpa.algo.util.filtering.log.time_filtering.events(ocel, start=None, end=None)

Returns the sub event log for a time window.

Parameters
  • ocel (OCEL) – Object-centric event log

  • start (timestamp) – Start of the window

  • end (timestamp) – End of the window

Returns

New sublog

Return type

OCEL

ocpa.algo.util.filtering.log.time_filtering.extract_sublog(ocel, start, end, strategy)

Returns the sub event log for a time window given the inclusion strategy.

Parameters
  • ocel (OCEL) – Object-centric event log

  • start (timestamp) – Start of the window

  • end (timestamp) – End of the window

  • strategy (func) – function that takes an ocel, start and end of the window and start and end of a process execution and returns a boolean whether the process execution will be included. E.g., by start timestamp of the process execution:. Can also be by events:

Returns

New sublog

Return type

OCEL

ocpa.algo.util.filtering.log.time_filtering.spanning(start, end, exec_start, exec_end)

Indicates whether a process execution belongs to a window given window start and end, and process execution start and end. A process execution belongs to a window if the there is an intersection between the window and the process execution time.

Parameters
  • start (timestamp) – Start of the window

  • end (timestamp) – End of the window

  • exec_start (timestamp) – Start of the process execution

  • exec_end (timestamp) – End of the process execution

Returns

Whether the process execution belongs to the window

Return type

boolean

ocpa.algo.util.filtering.log.time_filtering.start(start, end, exec_start, exec_end)

Indicates whether a process execution belongs to a window given window start and end, and process execution start and end. A process execution belongs to a window if the start is located in the window.

Parameters
  • start (timestamp) – Start of the window

  • end (timestamp) – End of the window

  • exec_start (timestamp) – Start of the process execution

  • exec_end (timestamp) – End of the process execution

Returns

Whether the process execution belongs to the window

Return type

boolean

ocpa.algo.util.filtering.log.variant_filtering module

ocpa.algo.util.filtering.log.variant_filtering.filter_infrequent_variants(ocel, threshold)

Filters infrequent variants from an OCEL

Parameters
  • ocel (OCEL) – Object-centric event log

  • threshold (float) – Cumulative frequency of the most frequent variants to be included.

Returns

Object-centric event log

Return type

OCEL

Module contents