I want to try root cause analysis in ML on my data.
I have followed the same way as here https://celonis.github.io/pycelonis/notebooks/01_Root_Cause_Analysis_Tutorial.html.
All steps work fine until it reachs the row
rca_result = RCA.apply()
The reported bug says this : UnboundLocalError: local variable 'za' referenced before assignment
Details listed below:
0it <00:00, ?it/s]
---------------------------------------------------------------------------
UnboundLocalError Traceback (most recent call last)
/tmp/ipykernel_740/325769791.py in <module>
----> 1 rca_result = RCA.apply()
~/.local/lib/python3.8/site-packages/pycelonis/root_cause_analysis/root_cause_analysis.py in apply(self)
60 selected_tables, search_list = self.filter_case_key()
61 chunks = self.create_chunk_list(selected_tables, search_list)
---> 62 za = self.calculate_kpis(chunks)
63 zb = self.postprocess_kpi_frame(za)
64 return zb
~/.local/lib/python3.8/site-packages/pycelonis/root_cause_analysis/root_cause_analysis.py in calculate_kpis(self, chunks)
268
269 # sort columns
--> 270 za = za za.columns.sort_values()]
271 # drop categories that are 100 % equal (i.e. duplicated)
272 za = za.drop_duplicates(subset=za.columns=za.columns.str.contains("Amount of")].tolist(), keep="first")
UnboundLocalError: local variable 'za' referenced before assignment
I think the linked tutorial has missed some steps. Can you provide me a full souce for root cause analysis?
Thanks very much.