Skip to content

Stream simulation and plots

PdmContext.utils.simulate_stream

simulate_stream

simulate_stream(TimeSeries, Events, Categoricals, targetname)

This method simulate the traffic of the data

Parameters:

TimeSeries: A list of time series data in form of (name,list with data, list of timestamp)

Events: A list of events in form of (name, list of timestamp when the event occured,type of the Event (isolated or configuration)) as expected in ContextGenerator.

Categoricals: A list of events data which contain tuples of : (name: str, occurrences :list of Dates, categories: list, type:str)

simulate_from_df

simulate_from_df(df, eventTypes, target_name)

Parameters:

df: Dataframe with the data to simulate stream, the index has to be of Date type.

eventTypes: Which columns are representing events and of what type example [("column1","isolated"),("column3","configuration")]

target_name: the target name data

return: an itterator

PdmContext.utils.showcontext

show_context_list

show_context_list(contextlist, target_text, filteredges=[['', '', '']], char=True)

Visualization of Contexts in the contextlist

Parameters:

contextlist: List of Context objects

target_text: The target data that the context built with

filteredges: A list of list, where each list define which of the edges in Context.Cr should be displayed where each time we check if the fields of the list are part of the edges text and characterization.

show_context_interpretations

show_context_interpretations(contextlist, target_text, filteredges=[['', '', '']])

Visualization of Interpretations from Contexts in the contextlist

Parameters:

contextlist: List of Context objects

target_text: The target data that the context built with

filteredges: A list of list, where each list define which of the edges in Context.Cr should be displayed where each time we check if the fields of the list are part of the edges text and characterization.