plot_dependency_graph_from_df

plot_dependency_graph_from_df#

mlproject.plotting.dependency_graph.plot_dependency_graph_from_df(results_df, feature1_name='Lobster Features', feature2_name='Matminer Features', target_name='Target', metric='MAE Mean', figsize=(10, 10), node_colors=None, title='', save_path=None)[source]#

Plot a dependency graph between two feature sets and a target using a results DataFrame.

Parameters:
  • results_df (pd.DataFrame) – DataFrame containing ‘From’, ‘To’, and metric columns.

  • feature1_name (str) – Name of the first feature node.

  • feature2_name (str) – Name of the second feature node.

  • target_name (str) – Name of the target node.

  • metric (str) – Metric to visualize on edges (e.g., ‘MAE Mean’, ‘R2 Mean’).

  • figsize (tuple) – Size of the figure.

  • node_colors (dict, optional) – Colors for the nodes, e.g., {feature1_name: ‘blue’, feature2_name: ‘green’, target_name: ‘orange’}.

  • title (str) – Title of the plot.

  • save_path (str, optional) – If provided, saves the figure to this path.

Return type:

None