Skip to content

back

IntersectionVisualizer

class arsa_ml.visualizers.IntersectionVisualizer(rashomon_intersection, y_true)


This class is responsible for creating visualizations and descriptions of the key properties and metrics related to the Rashomon Intersection. Is a subclass of the Visualizer class.

The main library used for the visualizations is Plotly.


Parameters


rashomon_intersection : RashomonIntersection
  created RashomonIntersection object for analysis.
y_true : pd.DataFrame
  true class labels for every observation in the test dataset. (Returned by converters)



Attributes


rashomon_set : RashomonIntersection
  The rashomon_intersection value. Overwrites the rashomon_set attribute of the Visualizer class.
y_true : pd.DataFrame
  y_true parameter value
binary_methods : list[str]
  list of methods names, which create plots for binary task type analysis.
binary_methods : list[str]
  list of methods names, which create plots for multiclass task type analysis/

Methods


Note: As this is a subclass of the Visualizer class, all methods, which are not specified in this section remain the same as in :

Visualizer documentation

base_metric_return()

  Overrides the base_metric_return() method from Visualizer class. Returns the list of metrics specified in the RashomonIntersection object to be analyzed. Returns the metrics and an empty plot.


Returns :
empty_plot : go.Figure
base_metrics : str

weighted_method_return()

  Additional method used only for the Rashomon Intersection analysis. Returns the name of the weighted_sum_method specified in the RashomonIntersection object to be analyzed. Returns the method name and an empty plot.


Returns :
empty_plot : go.Figure
weighted_sum_method : str

set_size_indicator()

  Overrides the set_size_indicator() from the Visualizer class. Creates the gauge plot representing the fracton of models from the leaderboard that are included in the Rashomon Intersection. Returns the plot with its description.

Returns :
gauge_plot : go.Figure
plot_descr : str

ambiguity_vs_epsilon()

  Overrides the ambigutiy_vs_epsilon() method from the Visualizer class. Creates the Line chart of the possible ambiguity values with respect to different epsilons. The x-axis represents the epsilon values, while the y-axis shows the corresponding ambiguities. The actual ambiguity value for the given Rashomon Intersection is highlighted with the different color. Returns the plot with its description.

Returns :
line_plot : go.Figure
plot_descr : str

proba_ambiguity_vs_epsilon()

  Overrides the proba_ambigutiy_vs_epsilon() method from the Visualizer class. Creates the Line chart of the possible probabilistic_ambiguity values with respect to different epsilons. The x-axis represents the epsilon values, while the y-axis shows the corresponding ambiguities. The actual probabilistic_ambiguity value for the given Rashomon Intersection is highlighted with the different color. Returns the plot with its description.

Returns :
line_plot : go.Figure
plot_descr : str

discrepancy_vs_epsilon()

  Overrides the discrepancy_vs_epsilon() method from the Visualizer class. Creates the Line chart of the possible discrepancy values with respect to different epsilons. The x-axis represents the epsilon values, while the y-axis shows the corresponding discrepancies. The actual discrepancy value for the given Rashomon Intersection is highlighted with the different color. Returns the plot with its description.

Returns :
line_plot : go.Figure
plot_descr : str

prba_discrepancy_vs_epsilon()

  Overrides the proba_discrepancy_vs_epsilon() method from the Visualizer class. Creates the Line chart of the possible probabilistic_discrepancy values with respect to different epsilons. The x-axis represents the epsilon values, while the y-axis shows the corresponding discrepancies. The actual probabilistic_discrepancy value for the given Rashomon Intersection is highlighted with the different color. Returns the plot with its description.

Returns :
line_plot : go.Figure
plot_descr : str

rashomon_ratio_vs_epsilon()

  Overrides the rashomon_ratio_vs_epsilon() method from the Visualizer class. Creates a Line chart of the possible rashomon_ratio values with respect to different epsilons. The x-axis represents the epsilon values, while the y-axis shows the corresponding rashomon_ratios. The actual rashomon_ratio value for the given Rashomon Intersection is highlighted with a different color. Returns the plot with its description.

Returns :
line_plot : go.Figure
plot_descr : str

pattern_rashomon_ratio_vs_epsilon()

  Overwrites the pattern_rashomon_ratio_vs_epsilon() method from the Visualizer class. Creates a Line chart of the possible pattern_rashomon_ratio values with respect to different epsilons. The x-axis represents the epsilon values, while the y-axis shows the corresponding pattern_rashomon_ratios. The actual pattern_rashomon_ratio value for the given Rashomon Intersection is highlighted with a different color. Returns the plot with its description.

Returns :
line_plot : go.Figure
plot_descr : str

generate_rashomon_set_table()

  Overrides the generate_rashomon_set_table() method from the Visualizer class. Creates a table with the names of models included in the intersection alongside with their scores for both specified evaluation metrics. Returns the table and the description containing information about the base_model and selected metrics.

Returns :
table : go.Figure
table_descr : str

generate_gauge_for_metrics()

  Creates gauge plots illustrating how many models from the separate Rashomon Sets for each metric are included in the Rashomon Intersection. Returns the plot with its description.

Returns :
gauge_plot : go.Figure
plot_descr : str

plot_venn_diagram()

  Creates the Venn diagram illustrating models, which are included in the separate Rashomon Sets for each metric, as well as the intersection of those two sets. Returns the plot with its description.

Returns :
venn_plot : go.Figure
plot_descr : str

pareto_front_plot()

  Creates the scatterplot with the x and y axes representing two evaluation metrics, and points representing models from the entire leaderboard. Models included in the Pareto Front are highlighted in a different color. To read more about the Parto Front in multiobjective optimization visit:

Multi-Objective Hyperparameter Optimization in ML.

Returns :
scatter_plot : go.Figure
plot_descr : str