hots.plot

Provide all plotting methods : different clustering results views, containers data, nodes data, continous plot in evaluation step.

hots.plot.init_containers_plot(df_indiv, sep_time, metric='cpu')[source]

Initialize containers consumption plot.

Parameters:
  • df_indiv (pd.DataFrame) – _description_

  • sep_time (int) – _description_

  • metric (str, optional) – _description_, defaults to ‘cpu’

Returns:

_description_

Return type:

Tuple

hots.plot.init_nodes_plot(df_indiv, dict_id_n, sep_time, max_cap, metric=None)[source]

Initialize nodes consumption plot.

Parameters:
  • df_indiv (pd.DataFrame) – _description_

  • dict_id_n (Dict) – _description_

  • sep_time (int) – _description_

  • max_cap (int) – _description_

  • metric (str, optional) – _description_, defaults to None

Returns:

_description_

Return type:

Tuple

hots.plot.init_plot_cluster_profiles(profiles, metric=None)[source]

Initialize clusters mean profiles plot.

Parameters:
  • profiles (np.array) – _description_

  • metric (str, optional) – _description_, defaults to None

Returns:

_description_

Return type:

Tuple

hots.plot.init_plot_clustering(df_clust, metric=None)[source]

Initialize clustering plot.

Parameters:
  • df_clust (pd.DataFrame) – _description_

  • metric (str, optional) – _description_, defaults to None

Returns:

_description_

Return type:

Tuple

hots.plot.init_plot_clustering_axes(df_clust, dict_id_c, metric='cpu')[source]

Initialize clustering plot.

Parameters:
  • df_clust (pd.DataFrame) – _description_

  • dict_id_c (Dict) – _description_

  • metric (str, optional) – _description_, defaults to ‘cpu’

Returns:

_description_

Return type:

Tuple

hots.plot.plot_cluster_profiles(profiles_)[source]

Plot mean profiles of clusters.

Parameters:

profiles (List) – _description_

hots.plot.plot_clustering(df_clust, dict_id_c, metric=None, title=None)[source]

Plot metric containers consumption, grouped by cluster.

Parameters:
  • df_clust (pd.DataFrame) – _description_

  • dict_id_c (Dict) – _description_

  • metric (str, optional) – _description_, defaults to None

  • title (str, optional) – _description_, defaults to None

Returns:

_description_

Return type:

plt.Figure

hots.plot.plot_clustering_containers_by_node(df_indiv, dict_id_c, labels_, filter_big=False, metric=None)[source]

Plot containers consumption grouped by node, one container added above another, with their cluster color.

Parameters:
  • df_indiv (pd.DataFrame) – _description_

  • dict_id_c (Dict) – _description_

  • labels (List) – _description_

  • filter_big (bool, optional) – _description_, defaults to False

  • metric (str, optional) – _description_, defaults to None

Returns:

_description_

Return type:

plt.Figure

hots.plot.plot_clustering_containers_by_node_spec_cont(df_indiv, dict_id_c, labels_, containers_toshow, metric='cpu')[source]

Plot containers consumption grouped by node, one container added above another, with their cluster color.

Parameters:
  • df_indiv (pd.DataFrame) – _description_

  • dict_id_c (Dict) – _description_

  • labels (List) – _description_

  • containers_toshow (List) – _description_

  • metric (str, optional) – _description_, defaults to ‘cpu’

hots.plot.plot_clustering_spec_cont(df_clust, dict_id_c, containers_toshow, metric='cpu', title=None)[source]

Plot metric containers consumption, grouped by cluster.

Parameters:
  • df_clust (pd.DataFrame) – _description_

  • dict_id_c (Dict) – _description_

  • containers_toshow (List) – _description_

  • metric (str, optional) – _description_, defaults to ‘cpu’

  • title (str, optional) – _description_, defaults to None

hots.plot.plot_conflict_graph(graph)[source]

Plot the conflict graph from dual values.

Parameters:

graph (nx.Graph) – _description_

hots.plot.plot_containers_clustering_together(df_clust, metric='cpu')[source]

Plot all containers consumption with their cluster color.

Parameters:
  • df_clust (pd.DataFrame) – _description_

  • metric (str, optional) – _description_, defaults to ‘cpu’

hots.plot.plot_containers_groupby_nodes(df_indiv, max_cap, sep_time, title=None, metrics=None)[source]

Plot containers consumption grouped by node.

Parameters:
  • df_indiv (pd.DataFrame) – _description_

  • max_cap (int) – _description_

  • sep_time (int) – _description_

  • title (str, optional) – _description_, defaults to None

  • metrics (List[str], optional) – _description_, defaults to None

Returns:

_description_

Return type:

plt.Figure

hots.plot.plot_dendrogram(z_all, k)[source]

Plot dendrogram for the hierarchical clustering building.

Parameters:
  • z_all (np.array) – _description_

  • k (int) – _description_

hots.plot.plot_nodes_wout_containers(instance)[source]

Plot nodes consumption without containers.

Parameters:

instance (Instance) – _description_

hots.plot.update_cluster_profiles(fig, ax, profiles, x, metric=None)[source]

Update the clusters profiles.

Parameters:
  • fig (_type_) – _description_

  • ax (_type_) – _description_

  • profiles (np.array) – _description_

  • x (np.array) – _description_

  • metric (str, optional) – _description_, defaults to None

hots.plot.update_clustering_plot(fig, ax, df_clust, dict_id_c, metric=None)[source]

Update clustering plot with new data.

Parameters:
  • fig (_type_) – _description_

  • ax (_type_) – _description_

  • df_clust (pd.DataFrame) – _description_

  • dict_id_c (Dict) – _description_

  • metric (str, optional) – _description_, defaults to None

hots.plot.update_clustering_plot_axes(fig, ax_, df_clust, dict_id_c, metric='cpu')[source]

Update clustering plot with new data.

Parameters:
  • fig (_type_) – _description_

  • ax (_type_) – _description_

  • df_clust (pd.DataFrame) – _description_

  • dict_id_c (Dict) – _description_

  • metric (str, optional) – _description_, defaults to ‘cpu’

hots.plot.update_containers_plot(fig, ax, df, t)[source]

Update containers consumption plot with new data.

Parameters:
  • fig (_type_) – _description_

  • ax (_type_) – _description_

  • df (pd.DataFrame) – _description_

  • t (int) – _description_

hots.plot.update_nodes_plot(fig, ax, df, dict_id_n, metric=None)[source]

Update nodes consumption plot with new data.

Parameters:
  • fig (_type_) – _description_

  • ax (_type_) – _description_

  • df (pd.DataFrame) – _description_

  • dict_id_n (Dict) – _description_

  • metric (str, optional) – _description_, defaults to None