Visualize Module

visualize_training.visualize.visualize_all_seeds(data_dir, loss_col: str, log_bool: bool = False)

Visualize HMM loss plots against the Epochs for all the random seeds

Parameters:
  • data_dir (str) – Path to data files.

  • loss_col (str) – Name of the loss column to be visualized

  • log_bool (bool, optional) – If log scale is to be considered or not. Defaults to False.

visualize_training.visualize.visualize_avg_log_likelihood(data, dataset_name, max_components=8)

Visualize average log likehood, AIC and BIC values against no of components. This visualization is helpful in choosing the best suited no of components.

Parameters:
  • data (dict) – Dictionary containing all the mean scores, AIC and BIC values

  • dataset_name (str) – Title of Chart (When working with multiple datasets, naming it after the dataset_name is the recommended approach)

  • max_components (int, optional) – Max no of components for which HMM model needs to be trained for. Defaults to 8.

visualize_training.visualize.visualize_hmm_loss(data, phase_col: str, epoch_col: str, loss_col: str, hover_data: Dict | None = None, norm_y: bool = False, log_y: bool = False, hex: List = ['#be0aff', '#ff0000', '#a1ff0a', '#580aff', '#ff8700', '#0aff99', '#deff0a', '#008bf8'])

Visualize HMM loss plot against the Epochs

Parameters:
  • data (pd.DataFrame) – input data containg training runs.

  • phase_col (str) – column name containing the HMM phases info.

  • epoch_col (str) – column name containing Epoch info.

  • loss_col (str) – column name for loss metric of the model

  • hover_data (Dict) – dictionary with column names as fields and bool value against them for visibility in tooltip during hover

visualize_training.visualize.visualize_states(transmat, node_hover_dict: Dict | None = None, edge_hover_dict: Dict | None = None, hex: List = ['#be0aff', '#ff0000', '#a1ff0a', '#580aff', '#ff8700', '#0aff99', '#deff0a', '#008bf8'])

Visualize HMM State Transitions

Parameters:
  • transmat (np.array) – state transition matrix

  • hover_dict (Dict) – phase wise list of important features to be shown in tooltip on hover

  • HEX_VALUES (List) – List containing HEX values of the color pallette

Output:

Interactive Graph Visualization with a toggle menu on the right to control graph features