The FlowGenerator class generates Flow objects from packets extracted by Reader. To convert features from individual packets to Flows, we use the flows.Flows.combine() method.

class flow_generator.FlowGenerator[source]

Generator for Flows from packets extraced using reader.Reader.read()


Combine individual packets into a flow representation

Parameters:packets (np.array of shape=(n_samples_packets, n_features_packets)) – Output from Reader.read
Returns:flows – Dictionary of flow_key -> Flow()
Return type:dict