NeSy4PPM.Data_preprocessing package — NeSy4PPM 0.1.0 documentation

# NeSy4PPM.Data_preprocessing package

## Submodules

## NeSy4PPM.Data_preprocessing.data_preprocessing module

NeSy4PPM.Data_preprocessing.data_preprocessing.encode_prefixes(log_data: LogData, prefixes, encoder: Encodings = Encodings.Index_based, resource: bool = False) → tuple

NeSy4PPM.Data_preprocessing.data_preprocessing.end_to_end_process(log_path: Path, log_name=None, train_ratio=0.8, train_log=None, test_log=None, case_name_key='case:concept:name', act_name_key='concept:name', res_name_key='org:resource', timestamp_key='time:timestamp', encoder: Encodings = Encodings.Index_based, resource: bool = False)

NeSy4PPM.Data_preprocessing.data_preprocessing.extract_encode_prefixes(log_data: LogData, encoder: Encodings = Encodings.Index_based, resource: bool = False)

NeSy4PPM.Data_preprocessing.data_preprocessing.extract_trace_prefixes(log_data: LogData, resource: bool = False)

  Extract activity and resource sequences starting from a list of trace ids (i.e. trace_names).

## NeSy4PPM.Data_preprocessing.log_utils module

class NeSy4PPM.Data_preprocessing.log_utils.LogData(log_path: Path, log_name=None, train_ratio=0.8, train_log=None, test_log=None, case_name_key='case:concept:name', act_name_key='concept:name', res_name_key='org:resource', timestamp_key='time:timestamp')

  Bases: `object`

  act_enc_mapping: {<class 'str'>}
  act_name_key: str
  case_name_key: str
  compliance_th: float
  encode_log(resource: bool, ascii_offset=161)
  evaluation_prefix_end: int
  evaluation_prefix_start: int
  evaluation_th: float
  evaluation_trace_ids = [<class 'str'>]
  label_name_key: str
  label_neg_val: str
  label_pos_val: str
  log: DataFrame
  log_name: str
  max_len: int
  read_log(log_path, log_name)
  res_enc_mapping: {<class 'str'>}
  res_name_key: str
  test_log_name: str
  timestamp_key: str
  timestamp_key2: str
  timestamp_key3: str
  timestamp_key4: str
  train_log_name: str
  training_trace_ids = [<class 'str'>]

## NeSy4PPM.Data_preprocessing.shared_variables module

This file was created in order to bring common variables and functions into one file to make code more clear

## NeSy4PPM.Data_preprocessing.utils module

class NeSy4PPM.Data_preprocessing.utils.BK_type(value)

  Bases: `Enum`

  An enumeration.

  Declare = '(MP)Declare'
  Declare_End = 'Declare_At_end'
  ProbDeclare = 'ProbDeclare'
  Procedural = 'Procedural'
  Procedural_End = 'Procedural_At_end'

class NeSy4PPM.Data_preprocessing.utils.Encodings(value)

  Bases: `Enum`

  An enumeration.

  Index_based = 'index-based'
  Multi_encoders = 'multi-encoders'
  One_hot = 'one-hot'
  Shrinked_based = 'shrinked index-based'

class NeSy4PPM.Data_preprocessing.utils.NN_model(value)

  Bases: `Enum`

  An enumeration.

  LSTM = 'LSTM'
  Transformer = 'keras_trans'

NeSy4PPM.Data_preprocessing.utils.discover_Petri_nets(log_data: LogData, pn_folder: Path = WindowsPath('C:/Users/JOukharijane/Desktop/PostDoc/NeSy4PPM/docs/source/data/input/petrinets'))

NeSy4PPM.Data_preprocessing.utils.extract_last_model_checkpoint(log_name: str, models_folder: str, model_type: str, ckeckpoint_folder=WindowsPath('C:/Users/JOukharijane/Desktop/PostDoc/NeSy4PPM/docs/source/data/output')) → Path

NeSy4PPM.Data_preprocessing.utils.load_bk(BK_file: Path)

NeSy4PPM.Data_preprocessing.utils.prepare_encoded_data(log_data: LogData, resource: bool)

  Get all possible symbols for activities and resources and annotate them with integers.

## Module contents