Label Real Dataset
- add_current_uc.apply_uc(row)
Assign a Use Case (UC) label to a row based on its timestamp.
- Args
row (pd.Series): A row with a ‘timestamp’ field.
- Returns
str: The UC label (‘uc1’ to ‘uc6’).
- add_current_uc.compare_intervals(row, interval)
Compare a timestamp from a row with a given time interval.
- Args
row (pd.Series): Row from the DataFrame with a ‘timestamp’ column.
interval (dict): Dictionary with “from” and “to” datetime strings.
- Returns
bool: True if timestamp is within interval, else False.
- add_current_uc.label_realnetwork_csv(input_path='../datasets/real_network_data_before_labeling.csv', output_path='../datasets/real_network_data_after_labeling.csv')
Load the CSV, assign UC labels to each row, and save the updated file.
- Args
input_path (str): Path to the input CSV file.
output_path (str): Path to save the labeled CSV file.
- Returns
None