Visualization
Plot_Series
- epilearn.visualize.plot_series.plot_series(x: array, columns: list)
Plots time series data from an array using Seaborn’s line plot functionality. Each series is represented as a separate line on the plot.
- Parameters:
x (np.array) – A NumPy array containing the data points of the time series.
columns (list) – List of strings representing the column names or labels for each time series in the array.
- Returns:
Displays the plot directly and returns None.
- Return type:
None
Plot_Graph
- epilearn.visualize.plot_series.plot_graph(states: array, graph: array, classes=None, layout=None)
Plots a graph using NetworkX where nodes are colored based on their state and annotated with class labels. The graph’s layout can be specified; otherwise, a spring layout is used.
- Parameters:
states (np.array) – Array containing the state of each node used to determine the color of nodes.
graph (np.array) – A 2D array where each column represents an edge between two nodes (start and end).
classes (list, optional) – List of class labels corresponding to each node. Default is None.
layout (dict, optional) – A dictionary defining the position of each node for custom layouts. If None, a spring layout is used. Default is None.
- Returns:
The positions of the nodes in the plot, useful for customizing the layout or for further graphical analysis.
- Return type:
dict