chore(stats): remove average_thread_depth

This commit is contained in:
2026-03-31 16:40:54 +01:00
parent 75fd042d74
commit efb4c8384d
4 changed files with 4 additions and 38 deletions

View File

@@ -31,28 +31,6 @@ class InteractionAnalysis:
return interactions
def average_thread_depth(self, df: pd.DataFrame):
depths = []
id_to_reply = df.set_index("id")["reply_to"].to_dict()
for _, row in df.iterrows():
depth = 0
current_id = row["id"]
while True:
reply_to = id_to_reply.get(current_id)
if pd.isna(reply_to) or reply_to == "":
break
depth += 1
current_id = reply_to
depths.append(depth)
if not depths:
return 0
return round(sum(depths) / len(depths), 2)
def top_interaction_pairs(self, df: pd.DataFrame, top_n=10):
graph = self.interaction_graph(df)
pairs = []

View File

@@ -119,7 +119,6 @@ class StatGen:
filtered_df = self._prepare_filtered_df(df, filters)
return {
"average_thread_depth": self.interaction_analysis.average_thread_depth(filtered_df),
"top_interaction_pairs": self.interaction_analysis.top_interaction_pairs(filtered_df, top_n=100),
"interaction_graph": self.interaction_analysis.interaction_graph(filtered_df),
"conversation_concentration": self.interaction_analysis.conversation_concentration(filtered_df)