Learn R Programming

pMineR (version 0.31)

cluster_partitionAroundMedoids: A class to perform Partition Around Medoids clustering on sequential data for Process Mining issues

Description

This class performs sequence clustering on an event-log with the Partition Around Medoids (PAM) algorithm. The public methods are:
  • cluster_partitionAroundMedoids() is the constructor of the class
  • loadDataset( ...) loads data taken from a dataLoader::getData() method, into a cluster_partitionAroundMedoids() object
  • calculateClusters() performs the actual clustering computation on the previously loaded dataset
  • getClusters() returns the clusters computed by the cluster_partitionAroundMedoids::calculateClusters() method
  • getClusterStats( ... ) returns informations about the clustering result (i.e. support, between-cluster distance, within-cluster mean distance and standard deviation)
  • getClusterLog( ... ) returns informations about the clustering computation itself (i.e. iterations needed to converge, centroids value after each iteration)

In order to better undestand the use of such methods, please visit: www.pminer.info

Parameters for cluster_partitionAroundMedoids::calculateClusters() method are:

  • num the number of clusters it has to generate
  • typeOfModel the name of the Process Mining model it has to use to generate the space (up to now, only the default "firstOrdermarkovModel" is provided)

Usage

cluster_partitionAroundMedoids()

Arguments

Examples

Run this code
## Not run: 
# 
# # create a Loader 
# obj.L<-dataLoader();   
# 
# # Load a .csv using "DES" and "ID" as column names to indicate events
# # and Patient's ID
# obj.L$load.csv(nomeFile = "../otherFiles/test_02.csv",
# IDName = "ID",EVENTName = "DES",dateColumnName = "DATA")
# 
# # now create an object cluster_partitionAroundMedoids
# obj.clPAM<- cluster_partitionAroundMedoids();
# 
# # load the data into logInspector object
# obj.clPAM$loadDataset( obj.L$getData() );
# 
# # perform clustering computation
# obj.clPAM$calculateClusters(num = 2);
# 
# # get calculated clusters
# a <- obj.clPAM$getClusters();
# 
# # get informations about performance of clusters
# b <- obj.clPAM$getClusterStats();
# 
# # get log of each iteration of the algorithm
# d <- obj.clPAM$getClusterLog();
# ## End(Not run)

Run the code above in your browser using DataLab