chore: extra commenting

This commit is contained in:
2026-01-21 11:11:49 +01:00
parent 7b2d80ac4c
commit b2f0746c01

View File

@@ -1,9 +1,9 @@
import pandas as pd import pandas as pd
import random import random
from sim.rl.behavior_loader import AgentBehaviorModel from sim.rl.behavior_loader import AgentBehaviorModel # TODO: proper import this
base_dir = "/home/velocitatem/Documents/Projects/PHANTOM/experiments" base_dir = "/home/velocitatem/Documents/Projects/PHANTOM/experiments"
human_dir, agent_dir = f"{base_dir}/collected_data/", f"{base_dir}/agents/collected_data/" agent_dir = f"{base_dir}/agents/collected_data/"
@@ -21,6 +21,7 @@ def contaminate_dataset(df : pd.DataFrame, on : str = "event_type",
'view': 'view_page' 'view': 'view_page'
# TODO: define properly for the given dataset # TODO: define properly for the given dataset
} }
# think about replacing with freqdist method from library
OG_event_distribution = df[on].value_counts(normalize=True).to_dict() OG_event_distribution = df[on].value_counts(normalize=True).to_dict()
# normalize to weights # normalize to weights
OG_event_distribution = {k: v / sum(OG_event_distribution.values()) for k, v in OG_event_distribution.items()} OG_event_distribution = {k: v / sum(OG_event_distribution.values()) for k, v in OG_event_distribution.items()}