NeSy4PPM.Prediction package

Submodules

NeSy4PPM.Prediction.Checkers module

class NeSy4PPM.Prediction.Checkers.Constraint_checker

Bases: object

check_trace_conformance(trace: dict, decl_model: DeclareModel, completed: bool = True, consider_vacuity: bool = False, concept_name: str = 'concept:name') List[CheckerResult]
class NeSy4PPM.Prediction.Checkers.TraceDeclareAnalyzer(log: D4PyEventLog, declare_model: DeclareModel, consider_vacuity: bool, completed: bool)

Bases: MPDeclareAnalyzer

run() MPDeclareResultsBrowser

Performs conformance checking for the provided event log and DECLARE model.

Parameters:

consider_vacuity (bool) – True means that vacuously satisfied traces are considered as satisfied, violated otherwise.

Returns:

dictionary where the key is a list containing trace position inside the log and the trace name, the value is a dictionary with keys the names of the constraints and values a CheckerResult object containing the number of pendings, activations, violations, fulfillments and the truth value of the trace for that constraint.

Return type:

conformance_checking_results

NeSy4PPM.Prediction.create_event_log module

NeSy4PPM.Prediction.create_event_log.convert_to_log(df, casecol, eventcol, trace_attrs=None, logname='Event log')
NeSy4PPM.Prediction.create_event_log.convert_trace(trace_id: str, event_col: str, df: DataFrame, trace_attrs=None) Trace

NeSy4PPM.Prediction.inference_algorithm module

NeSy4PPM.Prediction.inference_algorithm.run_experiments(log_data: LogData, evaluation_traces: DataFrame, maxlen, encoder: Encodings, char_indices, target_indices_char, char_indices_group, target_indices_char_group, model_file: Path, output_file: Path, bk_model, method_fitness: str | None = None, resource: bool = False, weight: float = 0.0, bk_end: bool = False, beam_size: int = 1)

NeSy4PPM.Prediction.predict_suffix module

NeSy4PPM.Prediction.predict_suffix.predict_evaluate(log_data: LogData, model_arch: NN_model, encoder: Encodings, output_filename: str, output_folder: Path = WindowsPath('C:/Users/JOukharijane/Desktop/PostDoc/NeSy4PPM/docs/source/data/output'), evaluation_trace_ids=None, bk_model=None, beam_size=3, method_fitness: str | None = None, weight: float = 0.0, resource: bool = False, bk_end: bool = False)

NeSy4PPM.Prediction.prepare_data module

This script prepares data in the format for the testing algorithms to run The script is expanded to the resource attribute

class NeSy4PPM.Prediction.prepare_data.ConstraintChecker(value)

Bases: Enum

An enumeration.

POSSIBLY_SATISFIED = 0.66
POSSIBLY_VIOLATED = 0.33
SATISFIED = 1
VIOLATED = 0
NeSy4PPM.Prediction.prepare_data.compliance_checking(log_data, temp_prediction, temp_res_prediction, bk_model, prefix_trace, resource=False, completed=False)
NeSy4PPM.Prediction.prepare_data.encode(crop_trace: DataFrame, log_data: LogData, encoder: Encodings, maxlen: int, char_indices: Dict[str, int], char_indices_group: Dict[str, int], resource: bool) ndarray

encoding of an ongoing trace (control-flow + resource)

NeSy4PPM.Prediction.prepare_data.get_beam_size(self, NodePrediction, current_prediction_premis, bk_model, weight, prefix_trace, prediction, res_prediction, target_ind_to_act, target_ind_to_res, log_data, resource, beam_size)
NeSy4PPM.Prediction.prepare_data.get_pn_fitness(bk_model, method_fitness: str, log: DataFrame, log_data: LogData) Dict[str, float]

Module contents