Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Stanislav Yuliyanov
oc-dfg-clustering
Commits
015aad52
Commit
015aad52
authored
May 18, 2022
by
Stanislav
Browse files
now uses the proper object type variable
parent
08621c49
Changes
1
Hide whitespace changes
Inline
Side-by-side
code/main.py
View file @
015aad52
...
...
@@ -23,7 +23,7 @@ p_ocel_file = './data/ocel.jsonocel'
p_mode
=
'all'
# object-type-name
p_object_type
=
'
item
s'
p_object_type
=
'
customer
s'
# example data for attribute weighting in distance measurements
p_attr_weights
=
{}
...
...
@@ -60,23 +60,21 @@ f.print_w_ts('ocel data read.')
# res = f.ocel_get_object_distances(ocel, p_object_type, p_attr_weights)
##### CALCULATING DISTANCE MATRIX #####
# Setting object type
obj_type = "items"
# List of all weights
weights = [1]
# Save unique activies to a list
unique_activities = f.get_unique_activities(sorted(pm4py.ocel_object_type_activities(ocel)[obj_type], reverse=False))
unique_activities = f.get_unique_activities(sorted(pm4py.ocel_object_type_activities(ocel)[
p_
obj
ect
_type], reverse=False))
# Create hash-table of activities to represent each one as a UNICODE-character
activity_dict = f.map_activities_to_letter(unique_activities)
# Create data frame with desired object type
oid_filtered = f.get_df("objects", obj_type, ocel)
oid_filtered = f.get_df("objects",
p_
obj
ect
_type, ocel)
# Create data frame with all relations
relations_df = f.get_df("relations", obj_type, ocel)
relations_df = f.get_df("relations",
p_
obj
ect
_type, ocel)
# Store control flow of every object to a list
cflow_list = f.find_cflow(relations_df, activity_dict)
...
...
@@ -111,7 +109,7 @@ f.print_w_ts('distance matrix calculated:')
f.print_w_ts(res)
f.print_w_ts('
duration
:
' + str(datetime.datetime.now() - start_ts))
print('
oid
list
:
')
print(list_oid)
#
print('
oid
list
:
')
#
print(list_oid)
quit()
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment