Description Usage Arguments Examples
This is an implementation of the Second Order Markov Model (SOMM) for Process Mining issues. This class provides a minimal set of methods to handle with the FOMM model:
secondOrderMarkovModel( )
is the costructor
loadDataset( )
loads data taken from a dataLoader::getData() method, into a SOMM object
trainModel( )
train a model using the previously loaded dataset
replay( )
re-play a given event log on the internal SOMM model
play( )
play the internal FOMM model a desired number of times, in order to simulate new event-logs. This methods can also, if desired, simulate event-logs which does not complies with the internal SOMM model.
getModel( )
return the trained internal SOMM model
In order to better undestand the use of such methods, please visit: www.pminer.info
The consturctor admit the following parameters: parameters.list a list containing possible parameters to tune the model.
1 | secondOrderMarkovModel(parameters.list = list())
|
parameters.list |
a list containing the parameters. The possible ones are: 'considerAutoLoop' and 'threshold'. 'considerAutoLoop' is a boolean which indicates if the autoloops have to be admitted, while 'threshold' is the minimum value that a probability should have to do not be set to zero, in the transition matrix. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ## Not run:
# create a Loader
obj.L<-dataLoader();
# Load a .csv
obj.L$load.csv(nomeFile = "../otherFiles/mammella.csv",
IDName = "CODICE_SANITARIO_ADT",
EVENTName = "DESC_REPARTO_RICOVERO",
dateColumnName = "DATA_RICOVERO")
# get the loaded data
dati <- obj.L$getData()
# build a Second Order Marvov Model with a threshold of 0.2
SOMM <- secondOrderMarkovModel(
parameters.list = list("threshold"=0.002))
# load the data
SOMM$loadDataset(dataList = dati)
# train a model
SOMM$trainModel()
# generate 10 new processes (nb: if the
# threshold is too low, it can fail...)
aaa <- SOMM$play(numberOfPlays = 10)
# get the transition matrix
TranMatrix <- SOMM$getModel(kindOfOutput = "MM.2.Matrix.perc")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.