ocpa.objects.log.importer.csv package
Subpackages
Submodules
ocpa.objects.log.importer.csv.factory module
- ocpa.objects.log.importer.csv.factory.apply(file_path, variant='to_ocel', parameters=None, file_path_object_attribute_table=None)
Reads a csv and transforms it into an OCEL object.
- Parameters
file_path (string) – Path to the csv file.
variant (string) – Method to import OCEL (default = TO_OCEL) (will be removed)
parameters (dict) –
- parameters that will be used for importing the log and for log settings:
obj_names: List of object types (columns in CSV)
val_names: List of attribute names (columns in CSV)
act_name: Column name of event’s activity
time_name: Column name of event’s timestamp
start_timestamp: Optional, column name of event’s start timestamp; If missing, replaced by time_name.
- execution_extraction: Optional, execution extraction technique to extract process executions (cases) in the log, possible values:
ocpa.algo.util.process_executions.factory.CONN_COMP(default)ocpa.algo.util.process_executions.factory.LEAD_TYPE
- variant_calculation: Optional, variant calculation technique to determine variants in the log, possible values:
ocpa.algo.util.variants.factory.TWO_PHASE(default)ocpa.algo.util.variants.factory.ONE_PHASE
timeout: Optional, seconds until variant calculation timeout.
leading_type: Optional, only used when execution_extraction=ocpa.algo.util.process_executions.factory.LEAD_TYPE, determines the leading type of the object types
exact_variant_calculation: Optional, boolean value for switching on the refinement of initial classes in the two-phase variant calculation. False (default) will most likely provide an approximation.
- Returns
- Return type
ocpa.objects.log.importer.csv.util module
- ocpa.objects.log.importer.csv.util.clean_arc_frequency(df, min_freq=0)
- ocpa.objects.log.importer.csv.util.clean_frequency(df, min_acti_freq=0)
- ocpa.objects.log.importer.csv.util.filter_by_timestamp(df, start_timestamp=None, end_timestamp=None)
- ocpa.objects.log.importer.csv.util.filter_object_df_by_object_ids(df, ids)
- ocpa.objects.log.importer.csv.util.filter_paths(df, paths, parameters=None)
Apply a filter on traces containing / not containing a path
- Parameters
df – Dataframe
paths – Paths to filter on
parameters –
- Possible parameters of the algorithm, including:
case_id_glue -> Case ID column in the dataframe attribute_key -> Attribute we want to filter positive -> Specifies if the filter should be applied including traces (positive=True) or excluding traces (positive=False)
- Returns
Filtered dataframe
- Return type
df
- ocpa.objects.log.importer.csv.util.succint_mdl_to_exploded_mdl(df)
- ocpa.objects.log.importer.csv.util.succint_stream_to_exploded_stream(stream)