pm4py tutorials - tutorial #4: Playing with Event Data; Lambda Functions

preview_player
Показать описание
In this tutorial we show how to use lambda functions, in PM4Py.

Рекомендации по теме
Комментарии
Автор

00:48 - lambda functions; filter, map and sort in Python
08:03 - reading XES file and filtering traces by length using filter with a lambda function
13:29 - using a filter_ function from pm4py library to conserve the EventLog format
27:15 - convert_to_event_stream function from pm4py library

ДаниилИмани
Автор

你好,这个运行示例的run-example.xes is not Found

佳佳-oz
Автор

As many others I get an error message because of this line:
from pm4py.object.log util import func as functools

It seems like this module was removed since version 2.1.3.1 of pm4py

I solved it by removing the import line and using pm4py.filter_trace() instead of functools.filter_() in the code:
trace_log = pm4py.filter_trace(lambda t: len(t) > 5, event_log)

VictorUdd
Автор

Thanks for this tutorial, it is very helpful...these methods convert_to_event_stream and convert_to_dataframe are extremely handy especially when one want to do some ML on log like classifications and anomaly detections..etc which can be an interesting tutorial idea btw :)

hussamalh
Автор

I get an import error as “func“ does not seem to be a part of pm4py.objects.log.util anymore (2.7.11) The release notes and the new docs don’t say where this went. Can you help out?

journeyofchanges
Автор

Thank you for the intersting tutorials. 🙂
I just got this ImportError:

ImportError Traceback (most recent call last)
in <module>
1 import pm4py
----> 2 from pm4py.objects.log.util import func as functools

ImportError: cannot import name 'func' from 'pm4py.objects.log.util'


How can I resolve this? Thank you very much in advance!

tobiasscherl
Автор

These are good videos. But code in this video seems to have errors. The iterable 't' we get out of event_log is not a list but a dataframe and all it contains is the same number of rows as the total number of events in the .xes. All the "trace" elements are lost in the read_xes process. I have typed the exact same code as in this tutorial and it does not give the same output. Can u please help?

The other issue I am facing is that the "from pm4py.objects.log.util import func" also fails.

I am using Google Colab - not sure if this is the issue.

kirthikaranantharam
Автор

Hi, one question: how can i remove a trace in xes file with python?

angelodicarlo
Автор

Thanks for the great tutorial!
Is there a source where the used code of your guides is available?
Thanks

simondevos
welcome to shbcf.ru