# for local run, before pygraphc packaging
import sys
sys.path.insert(0, '../pygraphc/misc')
from IPLoM import *
sys.path.insert(0, '../pygraphc/clustering')
from ClusterUtility import *
from ClusterEvaluation import *

ip_address = '161.166.232.17'
standard_path = '/home/hudan/Git/labeled-authlog/dataset/' + ip_address + '/'
standard_file = standard_path + 'auth.log.anon.labeled'
analyzed_file = 'auth.log.anon'
prediction_file = 'iplom-result-' + ip_address + '.txt'
OutputPath = './results'
para = Para(path=standard_path, logname=analyzed_file, save_path=OutputPath)

myparser = IPLoM(para)
time = myparser.main_process()
clusters = myparser.get_clusters()
original_logs = myparser.get_logs()

ClusterUtility.set_cluster_label_id(None, clusters, original_logs, prediction_file)
homogeneity_completeness_vmeasure = ClusterEvaluation.get_homogeneity_completeness_vmeasure(standard_file,
                                                                                            prediction_file)

print homogeneity_completeness_vmeasure
print ('The running time of IPLoM is', time)

@@ -213,16 +213,27 @@
 port *%0A%0A
+# set path%0A
 ip_addre
@@ -329,14 +329,8 @@
 ress
- + '/'
 %0Asta
@@ -573,16 +573,46 @@
 tPath)%0A%0A
+# call IPLoM and get clusters%0A
 myparser
@@ -729,16 +729,62 @@
 logs()%0A%0A
+# set cluster label to get evaluation metrics%0A
 ClusterU

Add some comments