Create Simulated Eventlog: Difference between revisions
No edit summary |
|||
Line 6: | Line 6: | ||
== Create simulation script in QPR ProcessAnalyzer == | == Create simulation script in QPR ProcessAnalyzer == | ||
1. Create the following example expression script (e.g., with name '''Create simulation model'''): | 1. Create the following example expression script (e.g., with name "'''Create simulation model''' '''- delete events'''"):<syntaxhighlight lang="typescript"> | ||
let sourceModel = ProjectByName("<project name>").ModelByName("<model name>"); | |||
let eventTypeColumnName = sourceModel.EventsDataTable.ColumnMappings["EventType"]; | |||
let flowFromEventType = "<from event type of a flow to modify>", flowToEventType = "<to event type of a flow to modify>"; | |||
let targetProject = Project; | |||
_system.ML.ApplyTransformations(#{ | |||
"PredictionProcedureName": "qprpa_sp_prediction_marhink", | |||
"Name": "My simulation model - delete", // Name of the PA model to generate to the target project. | |||
"SourceModel": sourceModel, // Snowflake-based PA model used for training the prediction model. | |||
"TargetProject": targetProject, // Target project to create the model into. | |||
"Transformations": [#{ | |||
"type": "modify_flow_durations", | |||
"column": eventTypeColumnName, | |||
"flows": [#{ | |||
"from": flowFromEventType, | |||
"to": flowToEventType, | |||
"probability": 1.0, | |||
"operation": #{ | |||
"type": "set_value", // options: set_value, multiply, add | |||
"value": 0.0 // time in seconds | |||
}, | |||
"delete": true | |||
}] | |||
}] | |||
}); | |||
</syntaxhighlight>2. Configure simulation for the previously created script as instructed in the next chapter. At minimum, replace the tags listed below with some suitable values: | |||
* '''<project name>''': Name of the project in which the source model is located. | |||
* '''<model name>''': Name of the model to be used as source model. This data in this source model will be used as source data to be modified by the simulation transformations. | |||
* '''<from event type of a flow to modify>''': .From-event type name of flows from which the from-event is to be deleted. | |||
* '''<to event type of a flow to modify>''': .To-event type name of flows from which the from-event is to be deleted. |
Revision as of 13:40, 15 November 2024
This article has instructions how to install, configure and use eventlog simulations. The simulation creates a new model that contains both the source model data and the new simulated data. Case attribute Simulated can be used to determine whether the case is in the source data (false) or whether the simulation generated it as a new simulated case (true).
Prerequisites for simulation
As prerequisite, prediction must be installed into the used Snowflake as described in Install prediction in Snowflake.
Create simulation script in QPR ProcessAnalyzer
1. Create the following example expression script (e.g., with name "Create simulation model - delete events"):
let sourceModel = ProjectByName("<project name>").ModelByName("<model name>");
let eventTypeColumnName = sourceModel.EventsDataTable.ColumnMappings["EventType"];
let flowFromEventType = "<from event type of a flow to modify>", flowToEventType = "<to event type of a flow to modify>";
let targetProject = Project;
_system.ML.ApplyTransformations(#{
"PredictionProcedureName": "qprpa_sp_prediction_marhink",
"Name": "My simulation model - delete", // Name of the PA model to generate to the target project.
"SourceModel": sourceModel, // Snowflake-based PA model used for training the prediction model.
"TargetProject": targetProject, // Target project to create the model into.
"Transformations": [#{
"type": "modify_flow_durations",
"column": eventTypeColumnName,
"flows": [#{
"from": flowFromEventType,
"to": flowToEventType,
"probability": 1.0,
"operation": #{
"type": "set_value", // options: set_value, multiply, add
"value": 0.0 // time in seconds
},
"delete": true
}]
}]
});
2. Configure simulation for the previously created script as instructed in the next chapter. At minimum, replace the tags listed below with some suitable values:
- <project name>: Name of the project in which the source model is located.
- <model name>: Name of the model to be used as source model. This data in this source model will be used as source data to be modified by the simulation transformations.
- <from event type of a flow to modify>: .From-event type name of flows from which the from-event is to be deleted.
- <to event type of a flow to modify>: .To-event type name of flows from which the from-event is to be deleted.