Closed Ichiruchan closed 2 years ago
Dear Ichiruchan,
The eventually follows filter has had some problems in the previous releases. Please ensure to use the latest version of PM4Py (pip install -U pm4py).
Then you can use it as follows and it works as expected:
import pm4py import pandas as pd
dataframe = pd.read_csv("C:/running-example.csv") dataframe = pm4py.format_dataframe(dataframe) filtered_log = pm4py.filter_eventually_follows_relation(dataframe, [("register request", "check ticket", "reinitiate request")])
Actually, my version is . I will try your suggestion. Thank you very much
I executed pip command. (And i think before this time, i have already used the latest version). It still gave me a wrong result .
Thank you for the detailed error description. We understood your problem. Before we release the proper fix, I would like to invite you to use the following command before the filter is applied:
dataframe = dataframe.reset_index()
Thank you for the detailed error description. We understood your problem. Before we release the proper fix, I would like to invite you to use the following command before the filter is applied:
dataframe = dataframe.reset_index()
Once i reseted index, the function runs correctly. I think the order of index is important for the follow function. So it is a good habit to sort timestamp with case id and reset index after sorting timestamp. Thanks a lot for your reply.
Thank you for your bug signaling
I want filter my dataframe according to the order of list [A, B, C ...]. Actually, i could find a lot of functions to realize it. According to the comments in source code, I used
from pm4py.algo.filtering.pandas.ltl.ltl_checker import eventually_follows
andmode1 = eventually_follows(my_data, ["order", "operation"])
. And the filtered result is strange