transformer.py
def evaluate_coverage(self, workflows, test_data, similarity_ratio=0.90):
        """
        this function evaluates the coverage of detected workflows (from logs) on the sample test dataset
        """
        tot_test_case = len(test_data)
        covered = 0
        for query in test_data:
            similarity_results = self.semantic_search(workflows, query, n_similarities=1)
            print("\n\n======================\n\n")
            print("test data: {0}".format([events_decoding[event] for event in query.split(' ')]))
            for idx, distance in similarity_results[0:1]:
                if (1 - distance) >= similarity_ratio:
                    covered = covered + 1
                    print([events_decoding[event] for event in list(workflows)[idx].split(' ')],
                          "(Score: %.4f)" % (1 - distance))

        print("Coverage: %{0} \n covered:{1}/{2}".format((covered/tot_test_case)*100, covered, tot_test_case))
        return covered, tot_test_case

        this function evaluates the coverage of detected workflows (from logs) on the sample test dataset
        
this function evaluates the coverage of detected workflows (from logs) on the sample test dataset
this function evaluates the coverage of detected workflows ( from logs ) on the sample test dataset
def evaluate_coverage(self, workflows, test_data, similarity_ratio=0.90):
        tot_test_case = len(test_data)
        covered = 0
        for query in test_data:
            similarity_results = self.semantic_search(workflows, query, n_similarities=1)
            print("\n\n======================\n\n")
            print("test data: {0}".format([events_decoding[event] for event in query.split(' ')]))
            for idx, distance in similarity_results[0:1]:
                if (1 - distance) >= similarity_ratio:
                    covered = covered + 1
                    print([events_decoding[event] for event in list(workflows)[idx].split(' ')],
                          "(Score: %.4f)" % (1 - distance))
        print("Coverage: %{0} \n covered:{1}/{2}".format((covered/tot_test_case)*100, covered, tot_test_case))
        return covered, tot_test_case
def evaluate_coverage ( self , workflows , test_data , similarity_ratio = 0.90 ) : tot_test_case = len ( test_data ) covered = 0 for query in test_data : similarity_results = self . semantic_search ( workflows , query , n_similarities = 1 ) print ( "\n\n======================\n\n" ) print ( "test data: {0}" . format ( [ events_decoding [ event ] for event in query . split ( ' ' ) ] ) ) for idx , distance in similarity_results [ 0 : 1 ] : if ( 1 - distance ) >= similarity_ratio : covered = covered + 1 print ( [ events_decoding [ event ] for event in list ( workflows ) [ idx ] . split ( ' ' ) ] , "(Score: %.4f)" % ( 1 - distance ) ) print ( "Coverage: %{0} \n covered:{1}/{2}" . format ( ( covered / tot_test_case ) * 100 , covered , tot_test_case ) ) return covered , tot_test_case
this function evaluates the coverage of detected workflows (from logs) on the sample test dataset
this function evaluates the coverage of detected workflows ( from logs ) on the sample test dataset
"""
        this function evaluates the coverage of detected workflows (from logs) on the sample test dataset
        """
self
workflows
test_data
similarity_ratio