plot_clusters

plot_clusters(ts: TSDataset, segment2cluster: Dict[str, int], centroids_df: Optional[pandas.core.frame.DataFrame] = None, columns_num: int = 2, figsize: Tuple[int, int] = (10, 5))[source]

Plot clusters [with centroids].

Parameters
  • ts (TSDataset) – TSDataset with timeseries

  • segment2cluster (Dict[str, int]) – mapping from segment to cluster in format {segment: cluster}

  • centroids_df (Optional[pandas.core.frame.DataFrame]) – dataframe with centroids

  • columns_num (int) – number of columns in subplots

  • figsize (Tuple[int, int]) – size of the figure per subplot with one segment in inches