agentMET4FOF streams

class agentMET4FOF.streams.CosineGenerator(num_cycles=1000)[source]
class agentMET4FOF.streams.DataStreamMET4FOF[source]

Class for creating finite datastream for ML with x as inputs and y as target Data can be fetched sequentially using next_sample() or all at once all_samples()

For sensors data: The format shape for 2D data stream (num_samples, n_sensors) The format shape for 3D data stream (num_samples, sample_length , n_sensors)

all_samples()[source]

Returns all the samples in the data stream

Returns:samples
Return type:dict of the form {‘x’: current_sample_x, ‘y’: current_sample_y}
next_sample(batch_size=1)[source]

Fetches the samples from the data stream and advances the internal pointer current_idx

Parameters:batch_size (int) – number of batches to get from data stream
Returns:samples
Return type:dict of the form {‘x’: current_sample_x, ‘y’: current_sample_y}
class agentMET4FOF.streams.SineGenerator(num_cycles=1000)[source]
agentMET4FOF.streams.extract_x_y(message)[source]
Extracts features & target from message[‘data’] with expected structure such as :
  1. tuple - (x,y)
  2. dict - {‘x’:x_data,’y’:y_data}

Handle data structures of dictionary to extract features & target